#24433: Connection reset 'every time' when running inside Docker container
-------------------------------+--------------------------------------
     Reporter:  zeonglow       |                    Owner:  nobody
         Type:  Uncategorized  |                   Status:  closed
    Component:  HTTP handling  |                  Version:  1.7
     Severity:  Normal         |               Resolution:  needsinfo
     Keywords:                 |             Triage Stage:  Unreviewed
    Has patch:  0              |      Needs documentation:  0
  Needs tests:  0              |  Patch needs improvement:  0
Easy pickings:  0              |                    UI/UX:  0
-------------------------------+--------------------------------------
Changes (by zeonglow):

 * type:  Bug => Uncategorized


Comment:

 Hi Tim,  yes you are correct,  this in not a Django problem. I'l put the
 answer here because I'm sure it will help someone ;-)

 If you run the following
 '''
 python manage.py runserver'''

 Django runs the development server on the localhost interface and port
 8000,  which is fine in most cases but with Docker, if you want to access
 'anything' from outside a container it must listen on the faux eth0
 interface, ( which is what the Docker documentation refers to as the
 'bridge' interface)

 In short
 '''
 python manage.py runserver 0.0.0.0:8000'''

 Works as expected.

 The reverse example

 '''python -m 'http.server' --bind localhost 8000'''
 ''Serving HTTP on 127.0.0.1 port 8000 ...
 ''
 Will now produce the 'connection resets' from outside the container.

--
Ticket URL: <https://code.djangoproject.com/ticket/24433#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.16263ea1506966fe5e45191ce1f1e0c9%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to