Skip to content

Instantly share code, notes, and snippets.

@Staggerlee011
Last active February 18, 2020 15:10
Show Gist options
  • Save Staggerlee011/ad04370f879e63766d4e2a72805148f0 to your computer and use it in GitHub Desktop.
Save Staggerlee011/ad04370f879e63766d4e2a72805148f0 to your computer and use it in GitHub Desktop.
docker-compose cheatsheet
## run a docker-compose
docker-compose up
## run specific file
docker-compose -f /tests/docker-compose.yml up
## run detatched
docker-compose up -d
## run a single container from the docker-compose
docker-compose up -d db
## interact with container
docker-compose run db psql -h db -U postgres
docker-compose run pgtap
## remove all docker-compose containers (using force so you dont get asked to confirm)
docker-compose rm -f
## stopping all containers
docker-compose stop
docker-compose down && docker-compose up --build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment