Docker flashcards
Pack an app with everything it needs, run it the same on a laptop, in CI and in production.
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.
Tap to turn over. Swipe right if you know it, left to see it again.
What you will learn
Start from zero
- What Docker is and why it exists4 cards
- The key words5 cards
- Getting ready3 cards
Core basics
- Containers and images4 cards
- Running and managing containers6 cards
- Building and tagging images3 cards
- Registries and platforms2 cards
- Configuration and data2 cards
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
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 testAbout these cards
- Reviewed 26 October 2026
- CoversDocker Engine 29.9Docker Compose v2 (Compose Specification)BuildKit with Dockerfile syntax 1
Checked against
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. Start from zero (12 cards): What Docker is, the key words in plain English, and your first container.
- 2. Core basics (17 cards): Images, containers, ports, logs and your first Dockerfile, with the mistakes beginners really make.
- 3. Next steps (18 cards): Volumes, layer caching, .dockerignore, Compose stacks, networking and health checks used every week.
- 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 runstarts a container from thehello-worldimage. 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 IMGRun in background, local port onlydocker run --rm -it IMG shThrowaway shell, removed on exitdocker ps -a --format 'table {{.Names}}\t{{.Status}}'All containers with statusdocker logs -f --since 10m apiFollow recent logsdocker exec -it api shShell in a running containerdocker stats --no-streamCPU and memory per containerdocker rm -f apiKill and remove
Build and ship
docker build -t app:1.4.0 .Build from Dockerfile in this folderdocker build --progress=plain --no-cache .Full log, ignore cachedocker buildx build --platform linux/amd64,linux/arm64 --pushMulti-arch imagedocker build --secret id=npmrc,src=~/.npmrc .Pass a build secret safelydocker tag app:1.4.0 ghcr.io/acme/app:1.4.0Name for a registrydocker push ghcr.io/acme/app:1.4.0Upload to registrydocker buildx imagetools inspect IMGDigests and platforms
Dockerfile
FROM node:24-slim AS buildNamed build stageCOPY package*.json ./Manifests first for cachingRUN --mount=type=cache,target=/root/.npm npm ciReuse download cacheCOPY --from=build /app/dist ./distTake output from a stageCOPY --chown=10001 . .Copy owned by the app userUSER 10001Drop rootHEALTHCHECK CMD curl -fsS localhost:8000/healthReport real healthCMD ["node", "server.js"]Exec form, gets signals
Compose
docker compose up -d --buildRebuild and start the stackdocker compose watchSync or rebuild on file changedocker compose logs -f apiFollow one servicedocker compose exec db psql -U appRun a tool in a servicedocker compose --profile dev upInclude optional dev servicesdocker compose configShow the merged final configdocker compose down -vStop and delete volumes too
Inspect and clean
docker system dfDisk used by typedocker image inspect IMG --format '{{.Config.User}}'Read one config fielddocker history --no-trunc IMGLayers and their commandsdocker builder prune --filter until=72hDrop old build cachedocker image prune -aRemove unused imagesdocker scout cves IMGList known vulnerabilities