memesearch
Docker Hostname Stack Overflow Fix

Docker Hostname Stack Overflow Fix

Download Find similar pictures
Text on the meme
I generally put something like this in settings.py: import socket try: HOSTNAME = socket.gethostname() except: HOSTNAME = 'localhost' My solution does not work, if you use Docker. It will show the container ID instead of the URL. My solution was written before Docker existed. Sorry.
What it means

A Stack Overflow-style screenshot shows Python code that sets HOSTNAME to the machine hostname, with answers explaining that Docker returns the container ID instead of the URL and that the solution predates Docker. The joke is a dry programming excuse for outdated advice, used when an old solution fails because modern technology changed the environment. EN: A Stack Overflow-style screenshot shows Python code that sets HOSTNAME to the machine hostname, with answers explaining that Docker returns the container ID instead of the URL and that the solution predates Docker. The joke is a dry programming excuse for outdated advice, used when an old solution fails because modern technology changed the environment.

Objects
Tags
Source
Template
Stack Overflow screenshot
Type
image
Size
727×346 · 26.9 KiB
Mood
dry, sarcastic
Language
en
Added