Docker Community Forums

Share and learn in the Docker community.

Can't access Docker container on exposed port from anywhere even localhost


(Benjbt) #1

I have been searching for an answer for this for days and don’t know the best place to ask for help, I must be missing something simple.

This problem is common to both my Fedora27 workstation and Ubuntuserver 16.4 LTS

I have installed Docker successfully and have some containers working but others cannot be accessed on 0.0.0.0: or localIP:

I have disabled firewall and flushed iptables, amongst others I am trying to get a minecraft server running on 25565

"To simply use the latest stable version, run

docker run -d -p 25565:25565 --name mc itzg/minecraft-server

where the standard server port, 25565, will be exposed on your host machine."

However, the port is not accessible “can’t establish a connection to the server at 0.0.0.0:25565”

Please help me understand what is blocking my port, this is doing my head in.


(Accetto) #2

Would it be possible that your host’s port 25565 is already taken (previous attempts maybe)? Have you tried another port, something like 35565:25565? Then you should be able to access it like localhost:35565.