#354 · Developer Tool

Docker Compose Port Mapper

Inspect published ports across every service in a Docker Compose file. The mapper normalizes short port syntax, identifies host IPs, published and target ports, and protocol, then highlights likely host-port collisions. This is a static view of the YAML—not a scan of your machine—so it works offline and keeps infrastructure configuration in the browser.

Developer Input

YAML or line input

Ad space

How to use this developer tool

  1. Paste the requested YAML or key/value input.
  2. Adjust the available options for the target output.
  3. Select Map Ports or press Ctrl/Cmd + Enter.
  4. Review findings, then copy or download the result.

What this developer tool does

Extracts short- and long-form port declarations, creates a service-to-port table, and detects repeated host IP, published port, and protocol combinations.

A missing host IP is treated as all interfaces. TCP is assumed when no protocol is supplied. Long-form target, published, host_ip, and protocol fields are recognized.

The result is generated locally and should be reviewed before deployment.

Example

The Sample button loads a representative input. Running it produces the same structured output displayed in the result panel, including counts and any findings.

services:
  web:
    image: nginx
    ports:
      - "127.0.0.1:8080:80/tcp"
      - "8443:443"
  dns:
    image: coredns/coredns
    ports:
      - "53:53/udp"

Use cases

  • Pre-commit configuration review
  • Pull request documentation
  • Migration inventory preparation
  • Training and troubleshooting

Tips for reliable output

  • Use spaces instead of tab indentation in YAML.
  • Keep multi-document separators on their own line.
  • Review generated files before applying them.
  • Confirm static findings with official CLI validation.
  • Avoid pasting production secrets into shared devices.

Processing details

A missing host IP is treated as all interfaces. TCP is assumed when no protocol is supplied. Long-form target, published, host_ip, and protocol fields are recognized.

Port ranges, variables, runtime allocation, network_mode, and ports opened only through expose are not fully evaluated.

Frequently asked questions

How does the mapper interpret 8080:80 in Docker Compose?

The result follows the static rules described on this page. Review finding 1 in context and confirm it with the relevant Docker or Kubernetes command before deployment.

Does it distinguish TCP and UDP mappings on the same host port?

The result follows the static rules described on this page. Review finding 2 in context and confirm it with the relevant Docker or Kubernetes command before deployment.

Why can two services show a possible host-port collision?

The result follows the static rules described on this page. Review finding 3 in context and confirm it with the relevant Docker or Kubernetes command before deployment.

Are expose entries treated as published host ports?

Input is processed in your browser. The page does not make a network request with the configuration, but downloaded output and browser history should still be handled according to your security policy.

Can the mapper detect ports already used by programs on my computer?

The result follows the static rules described on this page. Review finding 5 in context and confirm it with the relevant Docker or Kubernetes command before deployment.