Docker Community Forums

Share and learn in the Docker community.

Connection refused when trying to connect to container from outside host

I have a docker container that has published port 3001. I can connect to the docker container by pinging it from the host

$ netcat -vzn 3001
Connection to 3001 port [tcp/*] succeeded!

But from the outside of the host, I get connection refused.

$ netcat -vzn 3001
netcat: connect to port 3001 (tcp) failed: Connection refused

The docker container has published ports:

PORTS>3001/tcp, :::3001->3001/tcp

The host firewall has been disabled.
The host is a physical server running on Ubuntu.

Anyone have any ideas? Thanks :slight_smile: