Skip to content

Instantly share code, notes, and snippets.

@tylertadej
Last active August 30, 2018 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tylertadej/dd7f54ee369ba460dd5a15bd92386e88 to your computer and use it in GitHub Desktop.
Save tylertadej/dd7f54ee369ba460dd5a15bd92386e88 to your computer and use it in GitHub Desktop.

Docker cheat sheet

# bash into container
docker exec -it [container-id] bash

# exclude image from build
docker-compose up --scale serviceToNotRun=0

# kill all containers
docker kill $(docker ps -q)

# remove untagged images (usually fixes 'no space left on device')
docker rmi -f $(docker images | grep "<none>" | awk "{print \$3}")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment