0

Im running boot2docker. I have a container running which Ive opened port 8000 for. i.e

docker@boot2docker:/home/djangoapp/testtools$ docker ps -a
CONTAINER ID        IMAGE                                                              COMMAND                CREATED             STATUS                    PORTS                      NAMES
4c52d46227f2        felix001/djangoapp:1.0                                             "/bin/bash"            22 hours ago        Up 22 hours               127.0.0.1:8000->8000/tcp   ecstatic_noyce

However if I try to access the port I get a RST,

docker@boot2docker:/home/djangoapp/testtools$ curl http://127.0.0.1:8000
curl: (56) Recv failure: Connection reset by peer

Any ideas ?

felix001
  • 15,341
  • 32
  • 94
  • 121

2 Answers2

1

You need to use the IP address of the boot2docker VM. Usually 192.168.59.103.

Henrik Sachse
  • 51,228
  • 7
  • 46
  • 59
  • That was going to be my answer, except from the question it appears that the OP may already be *logged into* the boot2docker VM. – larsks Jul 23 '15 at 19:40
1

Have you tried seeing if the server is running? First, you are going to need to root into the container:

docker exec -it 4c52d46227f2 bash

Then, check if the server is running:

python manage.py runserver 0.0.0.0:8000

And, it might be something else other than manage.py for your container, but you get the idea.

Here is another article to help out to understand the manual process and setup: https://ochronus.com/docker-primer-django/

Eric Wanchic
  • 2,046
  • 1
  • 23
  • 26