Docker Cheatsheet Online | Common Docker Commands

Docker Cheatsheet

Core Docker image, container, volume, and compose commands.

11/11 commands
DevOpsBackend / DevOps

Use this Docker cheatsheet to handle local containers, debug runtime issues, and manage compose stacks quickly.

Image and Container Basics

Build image
docker build -t <image>:<tag> .
Run container
docker run -d --name <name> -p 8080:80 <image>:<tag>
List running containers
docker ps
List all containers
docker ps -a

Debug and Cleanup

View logs
docker logs -f <container>
Open shell
docker exec -it <container> sh
Stop and remove container
docker rm -f <container>
Remove dangling images
docker image prune -f

Docker Compose

Start services
docker compose up -d
Rebuild and start
docker compose up -d --build
Stop services
docker compose down

What Is Docker Cheatsheet?

Use this Docker cheatsheet to handle local containers, debug runtime issues, and manage compose stacks quickly.

Container lifecycle and logs

Image build and prune commands

Compose up, down, and rebuild flow

Key Features of Docker Cheatsheet

Container lifecycle and logs

Image build and prune commands

Compose up, down, and rebuild flow

How to Use Docker Cheatsheet

Step 1

Choose image, container, or compose section

Step 2

Copy the command and replace service or container names

Step 3

Use inspect/log commands first before destructive cleanup

Still need help?

Need a hand with Docker Cheatsheet? Reach out through support or send a feature request with your workflow.

Contact support