Show Menu
Cheatography

Docker Cheat Sheet (DRAFT) by

Most used Docker commands (not compose).

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Attaching a Shell

Attaching a Bash shell to an already running container:
docker exec -it my_con­tainer /bin/bash

Most used

docker ps
List running containers
docker ps -a
List all containers
docker pull <im­age>
Pull <im­age>
docker images
List pulled (local) images
docker rmi <im­age>
Remove <im­age>
Blocks of
<...>
are just placeh­olders and need to be replaced with an actual value.
 

Publish Images

docker save <my_image> | ssh -C user@my.remote.host.com docker load