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 0.0.0.0 3001
Connection to 0.0.0.0 3001 port [tcp/*] succeeded!
But from the outside of the host, I get connection refused.
$ netcat -vzn 10.0.0.154 3001
netcat: connect to 10.0.0.154 port 3001 (tcp) failed: Connection refused
The docker container has published ports:
PORTS
0.0.0.0:3001->3001/tcp, :::3001->3001/tcp
The host firewall has been disabled.
The host is a physical server running on Ubuntu.
The containers are not accessible even if running on the hosts network directly...
docker run -it -d -network=host ...
I've read all the documentation, and by every instruction, the containers SHOULD be accessible by hostIp:port with this current set up. I'm not sure if there's anything else I'm missing from Docker instructions, or there's something funky going on with the Ubuntu Server OS itself that is refusing these connections.
Any ideas? Thank you!