# Ports not binding?

**URL:** <https://forums.docker.com/t/ports-not-binding/12300>\
**Category:** General\
**Created:** [May 16, 2016, 3:35am UTC](https://forums.docker.com/t/ports-not-binding/12300 "2016-05-16T03:35:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![fossella](https://avatars.discourse-cdn.com/v4/letter/f/bc8723/32.png) [@fossella](https://forums.docker.com/u/fossella)\
**Post date:** [May 16, 2016, 3:35am UTC](https://forums.docker.com/t/ports-not-binding/12300/1 "2016-05-16T03:35:24Z")

</div>

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 [http://169.254.169.254/latest/meta-data/instance-id](http://169.254.169.254/latest/meta-data/instance-id)) -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 0.0.0.0:32778-\>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.

---

<div class="post-metadata">

**Author:** ![dvohra](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/dvohra/32/5429_2.png) [@dvohra](https://forums.docker.com/u/dvohra)\
**Post date:** [May 17, 2016, 2:42am UTC](https://forums.docker.com/t/ports-not-binding/12300/2 "2016-05-17T02:42:23Z")

</div>

What does the following command list?  
_docker ports_

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