Docker Community Forums

Share and learn in the Docker community.

Ports not binding?

(Fossella) #1

Hi there. I’m running this:
docker run -d --restart=always -p 4567 -v /var/run/docker.sock:/var/run/docker.sock -h $(curl -s -e SERVICE_NAME=dtn-orders -e SERVICE_CHECK_INTERVAL=10s -e SERVICE_ID=dtn-orders -e SERVICE_TAGS=http -e SERVICE_CHECK_HTTP=/health --name dtn-orders dtn-orders:latest

which results in this when I run docker ps:
44a7e7bf9ac6 dtn-orders:latest “/bin/sh -c '(cd /usr” 2 minutes ago Up 2 minutes>4567/tcp dtn-orders

But, when I try to curl port 32778, I get “Connection refused.”

This is working on my Mac- it’s only when I try it on Linux that it doesn’t work.

I have tried literally everything for two days trying to get this working.

(Dvohra) #2

What does the following command list?
docker ports

Could be the IP address which is wrong. What is
Port forwarding may need to be set to display in a browser.
http is not used with curl. Use curl without http.