Skip to content

Instantly share code, notes, and snippets.

@mlsaito
Last active June 14, 2018 12:25
Show Gist options
  • Save mlsaito/8ae16396c23ad9e69e91ab2deaa7b0b1 to your computer and use it in GitHub Desktop.
Save mlsaito/8ae16396c23ad9e69e91ab2deaa7b0b1 to your computer and use it in GitHub Desktop.
Docker Cheatsheet

Remove any stopped containers and all unused images (not just dangling images):

$ docker system prune -a

Stop all docker processes:

$ docker stop $(docker ps -a -q)

SSH to docker instance:

$ docker exec -it {instance_id} bash

Show all currently running docker containers:

$ docker ps

Up and build docker-compose:

$ docker-compose up --build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment