I'm new to Docker, and I can't seem to connect to any containers.
I installed Docker Toolbox. Now I'm trying to get Shipyard to work. I followed the steps inside of a Docker Quickstart Terminal. The instructions say:
Once deployed, the script will output the URL to connect along with credential information.
The Shipyard installer ended with:
Shipyard available at http://10.0.2.15:8080
Username: [elided] Password: [elided]
However, I went to http://10.0.2.15:8080
on my browser and it didn't connect.
In another Docker Quickstart Terminal, I did a docker ps
to see what the container was and to get its IP Address and I got:
$ docker inspect a4755 | grep IPAddress
"SecondaryIPAddresses": null,
"IPAddress": "172.17.0.8",
"IPAddress": "172.17.0.8",
I'm not sure why the IP was different, but I tried to connect to http://172.17.0.8:8080
and this didn't work either. http://localhost:8080
also failed.
This also happened when I tried to run docker-gunicorn-nginx - everything started, but I couldn't connect to the machine.
What gives?
If you read through Docker's Installation on Mac OS X you'll see that on OSX, Docker containers don't run on the host machine itself:
Indeed, opening a new Docker Quickstart Terminal, I see:
And, opening
http://192.168.99.100:8080
takes me to Shipyard. Success!You can try and execute this command:
it will return some thing like:
To get port number:
Example output (scroll right to see port mapping):
To verify if it is working do:
curl 192.168.99.100:8080