Docker Compose

  • Why: configure relationships between containers

  • Why: save our docker container run settings in easy-to-read file

  • Why: create one-liner developer environment startups

  • Comprised of 2 separate but related things

    1. YAML-formatted file that describes our solution options for:

      • containers

      • networks

      • volumes

    2. A CLI tool docker-compose used for local dev/test automation with those YAML files

docker-compose CLI

  • CLI tool comes with Docker for Windows/Mac, but separate download for Linux

  • Not a production-grade tool but ideal for local development and test

  • Commands are here Cheat Sheet

  • If all your projects had a Dockerfile and docker-compose.yml then "new developer onboarding" would be:

    • git clone github.com/some/software

    • docker-compose up

Last updated

Was this helpful?