Skip to content

Instantly share code, notes, and snippets.

@tomsapps
Created August 9, 2018 15:18
Show Gist options
  • Select an option

  • Save tomsapps/152ace4e9c337d647b9e1de111a06bbd to your computer and use it in GitHub Desktop.

Select an option

Save tomsapps/152ace4e9c337d647b9e1de111a06bbd to your computer and use it in GitHub Desktop.

docker-compose

Run and manage multi container docker applications.

  • Create and start all containers in the background using a docker-compose.yml file from the current directory:

docker-compose up -d

  • Start all containers, rebuild if necessary:

docker-compose up --build

  • Start all containers using an alternate compose file:

docker-compose --file {{path/to/file}} up

  • Stop all running containers:

docker-compose stop

  • Stop and remove all containers, networks, images, and volumes:

docker-compose down

  • Follow logs for all containers:

docker-compose logs --follow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment