running devel server in docker container

26 views
Skip to first unread message

Larry Martell

unread,
Jun 28, 2016, 5:02:23 PM6/28/16
to django...@googlegroups.com
I am trying to run the devel server in a docker container. On the
physical machine I don't have port 8000 available and I usually use
8006 for the devel server. Outside of the docker container I can
connect to 8006. Inside the container I tried both:

manage.py runserver 0.0.0.0:8006

and just manage.py runserver when starting the container with -p 8006:8000

But in both cases I cannot connect to the devel server at 8006. Anyone
know how to do this?

Michal Petrucha

unread,
Jun 28, 2016, 5:14:09 PM6/28/16
to django...@googlegroups.com
In the example you described, you launched runserver to listen on port
8006 inside the container, and then told docker to forward the host
port 8006 to port 8000 inside the container, but there's nothing
listening on port 8000 inside the container.

You'll want either to start the development server at port 8000 (and
keep the -p 8006:8000), or change the -p argument to 8006:8006.

Good luck,

Michal
signature.asc

Larry Martell

unread,
Jun 28, 2016, 5:21:01 PM6/28/16
to django...@googlegroups.com
Those were 2 different examples. In one case I started the container
with -p 8006:8000 and did:

runserver 0.0.0.0:8000

In the other case I didn't specify a the -p 8006:8000 at all and did:

runserver 0.0.0.0:8006

I could not connect in either case.

I just tried the second case again with -p 8006:8006 but still no joy.

Larry Martell

unread,
Jul 7, 2016, 3:27:36 PM7/7/16
to django...@googlegroups.com
This turned out to be a firewall issue.
Reply all
Reply to author
Forward
0 new messages