Docker Community Forums

Share and learn in the Docker community.

TCP connection refused when deploying docker container using Cloud Foundry

I have built a docker image contains a C++ application with MQTT & Mongodb module. When i tried to deploy it to my cloud using Cloud Foundry, this error showed up:
*ERR Failed to make TCP connection to port 1883: connection refused*
Given that 1883 is MQTT’s listen port. I’ve found on CloudFoundry Docker deploy that the only thing i need to do is include EXPOSE 1883 in my Dockerfile, which i have already done.
Can anyone explain what i have not considered so far? thank you for reading.