Skip to main content

Docker Cheatsheet and Reference

A comprehensive command reference for Docker, organized by task. Use this module as a quick-lookup guide during daily operations.

CommandDescription
docker run -d --name app IMAGEStart container in background
docker run --rm -it IMAGE shStart temporary interactive container
docker psList running containers
docker ps -aList all containers (including stopped)
docker stop CONTAINERGracefully stop (SIGTERM → SIGKILL after timeout)
docker kill CONTAINERForce stop immediately (SIGKILL)
docker rm CONTAINERRemove a stopped container
docker rm -f CONTAINERForce remove a running container
docker restart CONTAINERStop and start a container
docker rename OLD NEWRename a container

Detailed References

For expanded command explanations with examples:

Reference PageWhat It Covers
Core Engine Commandsdocker version, info, system df, events, diagnostics
Image and Build Commandsdocker build, tag, push, multi-stage, .dockerignore
Container Ops Commandsdocker run, exec, logs, inspect, debugging workflows
Network and Volume CommandsNetwork creation, DNS testing, volume management, backup
Compose Commandsdocker compose lifecycle, multi-file, production workflows