Docker Compose file · Services

Publish ports

Map host ports to container ports. Bind to localhost to keep a port private to your machine.

ports:
  - "8080:80"
  - "127.0.0.1:5432:5432"

Official Docker Compose file documentation

More services commands

All services commands · Docker Compose file cheatsheet

Was this page helpful?