Docker CLI Builder

Generate complex docker run commands instantly. Configure ports, volumes, and flags with ease.

bash — docker
$

Command Reference

Containers

docker ps

List running containers

docker ps -a

List all containers (incl. stopped)

docker start <container>

Start a stopped container

docker stop <container>

Stop a running container

docker rm <container>

Remove a container

docker logs -f <container>

View logs (follow mode)

docker exec -it <container> sh

Open shell inside container

docker inspect <container>

View container details (JSON)

Images

docker images

List available images

docker pull <image>

Download image from registry

docker build -t <name> .

Build image from Dockerfile

docker rmi <image>

Remove an image

docker tag <src> <target>

Tag an image

docker history <image>

Show image history

Volumes & Network

docker volume create <name>

Create a named volume

docker volume ls

List volumes

docker network create <name>

Create a user-defined network

docker network ls

List networks

docker network connect <net> <con>

Connect container to network

System & Cleanup

docker system prune

Remove unused data

docker image prune -a

Remove all unused images

docker container prune

Remove all stopped containers

docker stats

Live resource usage stats

Docker Compose

docker-compose up -d

Start all services in background

docker-compose down

Stop and remove resources

docker-compose logs -f

View output from all services

docker-compose ps

List compose containers

docker-compose build

Rebuild services

# Docker Cheatsheet & Command Builder

Docker is the de facto standard for building and running containerized applications. However, remembering every flag for the docker run command can be challenging.

This Docker Cheatsheet provides two powerful tools: an interactive builder to generate run commands with ports, volumes, and common flags, and a searchable reference guide for essential lifecycle, image, and network commands.

Key Concepts

  • Images: Read-only templates used to create containers (e.g., `nginx`).
  • Containers: Runnable instances of an image.
  • Volumes: Persist data generated by and used by Docker containers.
  • Ports: Map a host port to a container port to allow external access.