Docker Commands Cheatsheet

Quick reference for Docker containers, images, volumes, networks, and Compose

A Docker commands cheatsheet gives you instant access to every essential Docker CLI command — from spinning up containers and building images to managing volumes, networks, and multi-service Compose stacks. Whether you are new to containerization or an experienced DevOps engineer who needs a quick syntax reminder, this interactive reference covers all major Docker workflows with real examples and one-click copy buttons.

How to Use This Docker Commands Cheatsheet

This interactive Docker commands cheatsheet is designed to be your go-to reference for the Docker CLI. Whether you are running your first container, building a production image, or orchestrating a multi-service application with Compose, every command you need is organized by category and searchable in seconds.

Searching for Commands

Type any keyword into the search bar to instantly filter commands. You can search by command name (e.g., exec), by description (e.g., "follow logs"), or by example text. Results update live as you type. Click Clear or delete the search text to return to the full list.

Filtering by Category

Use the category tab buttons to focus on a specific area: Containers covers all lifecycle commands — run, stop, start, restart, remove, exec, logs, and inspect; Images covers building, pulling, tagging, and pushing images; Volumes covers persistent data storage; Networks covers container networking; Compose covers multi-service orchestration with docker compose; and System covers disk usage and cleanup.

Copying Commands

Every command card has a Copy button. Click it to copy the command syntax to your clipboard, then paste it directly into your terminal. The button briefly shows "Copied!" to confirm. The syntax uses placeholders like CONTAINER, IMAGE, and NAME — replace those with your actual values.

Destructive Commands

Commands that permanently delete data — such as docker rm -f, docker volume prune, and docker system prune -a — are marked with a red Destructive badge so you can proceed with caution. These commands cannot be undone.

Common Docker Workflows

Most Docker work follows predictable patterns. To run a service: docker run -d -p 8080:80 nginx. To debug a running container: docker exec -it CONTAINER bash. To build and publish an image: docker build -t name:tag . then docker push name:tag. For multi-service stacks, docker compose up -d and docker compose logs -f are your most-used commands. This Docker CLI reference covers every step so you can find exactly what you need without leaving your browser.

Frequently Asked Questions

Is this Docker cheatsheet free to use?

Yes, this Docker commands cheatsheet is completely free with no signup, account, or payment required. All commands are available instantly in your browser.

Is my data safe when using this tool?

Absolutely. This cheatsheet runs entirely in your browser — no data is sent to any server. Your searches and usage are completely private.

What Docker commands are covered in this cheatsheet?

The cheatsheet covers all major Docker CLI areas: container management (run, stop, start, exec, logs), image management (build, pull, push, tag), volume management, network management, Docker Compose workflows, and system cleanup commands. Over 60 essential commands are included.

How do I search for a specific Docker command?

Use the search bar at the top to instantly filter commands. You can search by command name (e.g., 'exec'), by description (e.g., 'stop container'), or by example. Results update live as you type. You can also filter by category using the tab buttons.

How do I copy a Docker command from the cheatsheet?

Every command card has a Copy button. Click it to instantly copy the command syntax to your clipboard, ready to paste into your terminal. The button briefly shows 'Copied!' to confirm the action.

What is the difference between docker stop and docker rm?

docker stop sends a SIGTERM signal to gracefully stop a running container, but the container still exists and can be restarted with docker start. docker rm deletes the stopped container entirely. To stop and remove in one step, use docker rm -f on a running container.

What does the -d flag do in docker run?

The -d flag runs the container in detached (background) mode. Without it, the container runs in the foreground and your terminal is attached to its output. Use -d for long-running services like web servers and databases so your terminal stays free.

How do I clean up unused Docker resources?

Use docker system prune to remove all stopped containers, unused networks, dangling images, and build cache in one command. Add -a to also remove all unused images (not just dangling ones). Use docker volume prune separately for unused volumes, as volumes are not removed by system prune by default.