TodayTools

Docker flashcards

Pack an app with everything it needs, run it the same on a laptop, in CI and in production.

Donate
Beginner friendly, starts from zero
Section
How to study
0
DockerStart from zero · 1 of 12

What is Docker, in one plain sentence?

A tool that packs an app together with everything it needs to run, so it works the same on any computer.

A lunch box that holds the whole meal, plate and spoon included.
Show again
12 left
Got it

Tap to turn over. Swipe right if you know it, left to see it again.

All topics

What you will learn

  1. Start from zero

    • What Docker is and why it exists4 cards
    • The key words5 cards
    • Getting ready3 cards
  2. Core basics

    • Containers and images4 cards
    • Running and managing containers6 cards
    • Building and tagging images3 cards
    • Registries and platforms2 cards
    • Configuration and data2 cards
  3. Next steps

    • Volumes and mounts2 cards
    • Build cache and build context3 cards
    • Startup commands and image metadata3 cards
    • Compose for local stacks4 cards
    • Container networking3 cards
    • Health, restarts and disk use3 cards
  4. Go deeper

    • Small, repeatable images3 cards
    • Image security and supply chain5 cards
    • BuildKit and CI3 cards
    • Processes, resources and logs5 cards
    • Compose in real projects2 cards
    • Isolation and scaling out2 cards

Final test and certificate

10 questions drawn fresh from the whole topic, about 15 minutes. Sign in, score 80% or more and get a free certificate with your name and a public check link anyone can open, such as an employer or a teacher. Not signed in? Try a practice test from the cards.

Take the final test

About these cards

  • Reviewed 26 October 2026
  • CoversDocker Engine 29.9Docker Compose v2 (Compose Specification)BuildKit with Dockerfile syntax 1
How these cards are made

Docker at a glance

Docker packs an app with everything it needs, so it runs the same on every computer.

Like a shipping container: one standard box that any ship or truck can carry, whatever is inside.

Words you will meet

Image
The packed, frozen app with everything it needs
Container
One running copy of an image
Host
The computer Docker is running on
Port
A numbered door that lets other programs reach the app
Dockerfile
A text file with the steps to build an image
Tag
A version label on an image, like 2.4.1
Registry
An online shelf where images are stored and shared
Volume
A storage folder outside the container that keeps your data safe

The steps

  1. 1. Start from zero (12 cards): What Docker is, the key words in plain English, and your first container.
  2. 2. Core basics (17 cards): Images, containers, ports, logs and your first Dockerfile, with the mistakes beginners really make.
  3. 3. Next steps (18 cards): Volumes, layer caching, .dockerignore, Compose stacks, networking and health checks used every week.
  4. 4. Go deeper (20 cards): Small hardened images, BuildKit, multi-arch builds, signals, supply chain, CI caching and the kernel features underneath.
All 12 cards in Start from zero
What is Docker, in one plain sentence?
A tool that packs an app together with everything it needs to run, so it works the same on any computer.
What problem did people have before Docker?
An app worked on one person's laptop and broke on another because a tool or version was different. Setting up each new computer took hours of careful steps.
Where do you already meet Docker without knowing it?
Many websites and apps you use every day, from shops to banking, run inside Docker-style containers on big server computers in data centres.
What is an everyday picture for images and containers?
Shipping containers. Every box has the same shape, so any ship or truck can carry it, whatever is inside. Docker does the same for apps.
What are a server, a terminal and a command?
A server is a computer that runs apps for other people, usually far away. A terminal is a text window where you type a command, a short line telling the computer what to do.
What do image and container mean?
An image is the packed, frozen app: the recipe plus all ingredients. A container is one running copy of an image. One image can start many containers.
What are the host, a process and a port?
The host is the computer Docker runs on. A process is one program that is running right now. A port is a numbered door, like 8080, that lets other programs talk to it.
What are a Dockerfile, a tag and a registry?
A Dockerfile is a text file of steps for building an image. A tag is a version label on an image, like 2.4. A registry is an online shelf where images are stored and shared.
What is a volume, and why does it matter?
A volume is a safe storage folder that lives outside the container. Throw a container away and its own files go too, but the volume keeps your data.
What do you need before you start?
A computer with Docker Desktop installed (free for personal use) and a terminal. You do not need to know how servers work yet.
What does your first Docker command do?
docker run starts a container from the hello-world image. Docker downloads the image the first time, prints a welcome message, and the container stops.
What will you be able to do after this topic?
Run any app from an image, open it in your browser through a port, write a Dockerfile for your own app, keep data safe in a volume and share your image through a registry.
Docker cheatsheet

Containers

  • docker run -d --name api -p 127.0.0.1:8000:8000 IMG Run in background, local port only
  • docker run --rm -it IMG sh Throwaway shell, removed on exit
  • docker ps -a --format 'table {{.Names}}\t{{.Status}}' All containers with status
  • docker logs -f --since 10m api Follow recent logs
  • docker exec -it api sh Shell in a running container
  • docker stats --no-stream CPU and memory per container
  • docker rm -f api Kill and remove

Build and ship

  • docker build -t app:1.4.0 . Build from Dockerfile in this folder
  • docker build --progress=plain --no-cache . Full log, ignore cache
  • docker buildx build --platform linux/amd64,linux/arm64 --push Multi-arch image
  • docker build --secret id=npmrc,src=~/.npmrc . Pass a build secret safely
  • docker tag app:1.4.0 ghcr.io/acme/app:1.4.0 Name for a registry
  • docker push ghcr.io/acme/app:1.4.0 Upload to registry
  • docker buildx imagetools inspect IMG Digests and platforms

Dockerfile

  • FROM node:24-slim AS build Named build stage
  • COPY package*.json ./ Manifests first for caching
  • RUN --mount=type=cache,target=/root/.npm npm ci Reuse download cache
  • COPY --from=build /app/dist ./dist Take output from a stage
  • COPY --chown=10001 . . Copy owned by the app user
  • USER 10001 Drop root
  • HEALTHCHECK CMD curl -fsS localhost:8000/health Report real health
  • CMD ["node", "server.js"] Exec form, gets signals

Compose

  • docker compose up -d --build Rebuild and start the stack
  • docker compose watch Sync or rebuild on file change
  • docker compose logs -f api Follow one service
  • docker compose exec db psql -U app Run a tool in a service
  • docker compose --profile dev up Include optional dev services
  • docker compose config Show the merged final config
  • docker compose down -v Stop and delete volumes too

Inspect and clean

  • docker system df Disk used by type
  • docker image inspect IMG --format '{{.Config.User}}' Read one config field
  • docker history --no-trunc IMG Layers and their commands
  • docker builder prune --filter until=72h Drop old build cache
  • docker image prune -a Remove unused images
  • docker scout cves IMG List known vulnerabilities
Donate