Docker Cheat Sheet

Oct 8, 2018

Containers

docker create IMAGE
Creates a docker container based off of IMAGE, but does not run

docker rename CONTAINER NEW_NAME
Renames a docker container

docker start CONTAINER
Starts a docker container

docker restart CONTAINER
Restarts a docker container

docker stop CONTAINER
Stops a docker container

docker kill CONTAINER
Sends SIGKILL signal to a docker container

docker rm CONTAINER
Removes a docker container

Images

docker rmi IMAGE
Removes a docker image

Extra

With great power comes great responsibility.

docker container prune Removes all dangling (stopped) containers

docker image prune
Removes all dangling (unused) images