pecigonzalo / docker-machine-vmwareworkstation

VMWare Workstation driver for Docker Machine https://github.com/docker/machine
Apache License 2.0
363 stars 67 forks source link

Connection deny when trying to connect to container with postgres, get boot2docker IP #60

Closed FilipVPetrov closed 6 years ago

FilipVPetrov commented 6 years ago

Hello everyone,

After I start a container with

docker run -p 5432:5432 --name postgres -e POSTGRES_PASSWORD=admin -e POSTGRES_USER=admin -e POSTGRES_DB=postgres -d postgres

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 32e99cf9ca64 postgres "docker-entrypoint.s…" 5 days ago Up 8 minutes 0.0.0.0:5432->5432/tcp postgres

But when I try to connect on localhost, I`m getting a connection refused. I saw that the boot2docker image is able to be managed but there is an option only for Virtualbox. I have look at this tutorial. How can I get boot2docker IP?

FilipVPetrov commented 6 years ago

I have used docker-machine ip dev and connect to the IP:port and the connection was successful. Please close it.