Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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