Docker Community Forums

Share and learn in the Docker community.

Port 80 for docker-compose.yml not working?


I set up WordPress with Docker-compose. When I set the .yml file to contain “Ports: 8000:80” it will work only for 8000. For example I can successfully visit the IP address for the server as When I change it to Ports: 80:80 and then restart Docker-Compose and re-up it (docker-compose up -d) everything updates correctly. But when I try visiting the IP address without the 8000, it refuses to connect.

Is there something simple I’m missing here? I simply want to be able to access the IP address via Port 80 instead of Port 8000.I’m hoping that I’m just not seeing a simple step. Cheers for any advice.

Did you verify that the port is being listened on by the correct process, e.g., using netstat -tulpn

Hello Nathan, thank you for your response. This is the result I get-

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0* LISTEN 1611/sshd
tcp6 0 0 :::80 :::* LISTEN 13637/docker-proxy
tcp6 0 0 :::22 :::* LISTEN 1611/sshd

Does this look look the port is listening to the correct process?

Yes looks like 80 is listening on the host computer properly, which suggests it’s not a Docker problem. I’d guess you probably have some kind of firewall or other network wonkiness preventing ingress to that box on 80