Tuesday, June 28, 2016

Re: running devel server in docker container

On Tue, Jun 28, 2016 at 5:11 PM, Michal Petrucha
<michal.petrucha@koniiiik.org> wrote:
> 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.

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.

--
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/CACwCsY6v-y748beduotj%3DGz1k431MUr8h1dd6CQwp8wDwuOPRw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment