Skip to content
DevMeme
1994 of 7590
Containerization Post #2222 · source on Telegram

Pre-Docker Advice Meets Containers

Description

The image is a Stack Overflow answer screenshot showing Python code introduced by the sentence, "I generally put something like this in settings.py:" The code imports `socket`, tries `HOSTNAME = socket.gethostname()`, and falls back to `HOSTNAME = 'localhost'` in a bare `except`. A later comment says, "Your solution does not work, if you use Docker. It will show the container ID instead of the URL," and the answer author replies, "My solution was written before Docker existed. Sorry." The humor comes from old Stack Overflow advice aging into a different infrastructure era, where container identity breaks assumptions that were reasonable before Docker.

Comments

2
Anonymous ★ Top Pick Nothing timestamps a Stack Overflow answer like a hostname bug that predates the entire container namespace problem.
  1. Anonymous ★ Top Pick

    Nothing timestamps a Stack Overflow answer like a hostname bug that predates the entire container namespace problem.

  2. @catkov 5y

    😂

Use J and K for navigation