A working reference for how images get built, how containers run, and every command you'll reach for in between. Laid out like cargo on a dock — stacked, labeled, ready to move.
Every Dockerfile instruction adds one read-only layer on top of the last. Docker caches each layer, so ordering them from least-changing (dependencies) to most-changing (your source code) keeps rebuilds fast.
The same image moves through three states: built once, run many times, and shared through a registry. Compose sits alongside this for multi-container setups.
Source of truth for the image.
Immutable, versioned, taggable.
docker build -t app:1.0 .
A running instance of the image.
docker run -d -p 3000:3000 app:1.0
Where images are stored and pulled from.
docker push app:1.0
docker-compose.yml describes a whole stack — every service, how they connect, and what they depend on — so `docker compose up` can start it all at once.
services: web: build: . ports: - "3000:3000" environment: - NODE_ENV=production depends_on: - db volumes: - ./src:/app/src db: image: postgres:16 environment: - POSTGRES_PASSWORD=secret volumes: - db-data:/var/lib/postgresql/data volumes: db-data:
Search by command or keyword, or filter by category. Click any command to copy it.