Docker Compose Ports Checker
Review published ports, host bindings, ranges, protocols, expose entries, and cross-service conflicts before deployment.
Paste a Docker Compose file to check published ports, exposed ports, duplicate host ports, and service-level port mapping problems.
Check Options
Ports Output
Docker Compose ports output will appear here.
Host bindings are where Compose port collisions happen
Several services can normally use the same container port because each container has its own network namespace. The collision usually begins when two services try to publish an overlapping host IP, host port, and protocol binding.
The checker reads ports and expose entries and reports duplicate published bindings, invalid mappings, privileged ports, and other review notes before the stack is started.
Short and long syntax still describe the same network boundary
Short syntax can combine the host address, published port, container port, and protocol in one value, while long syntax names those parts explicitly. A host address such as 127.0.0.1 narrows the binding to that interface; it does not turn the published port into an internal-only container port.
services:
web:
ports:
- "8080:80"
- "127.0.0.1:9229:9229"
admin:
ports:
- "8080:8080"In this example, web and admin both try to own host port 8080. Their container-side ports differ, but that does not remove the host-side conflict.
ports and expose answer different reachability questions
The ports section publishes a container port to the host machine. The expose section does not create that host publication. A service can therefore be reachable by other containers without being published to your laptop or server.
When a service is not reachable from the browser or an API client, check whether the expected port is actually published and whether another service in the same Compose model claims an overlapping host binding.
What this browser-side check cannot prove
Docker documents both short and long ports syntax, requires equivalent host/container range lengths, and rejects port publishing with network_mode: host. This checker can review those declarations, but it does not run the Docker Engine or test whether an operating-system process outside the Compose file already occupies a port.
