Tuesday, June 28, 2016

Re: running devel server in docker container

On Tue, Jun 28, 2016 at 05:01:20PM -0400, Larry Martell wrote:
> 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?

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

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/20160628211153.GU29054%40koniiiik.org.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment