Images and containers
An image is the packaged, read-only template. A container is a runnable instance with its own lifecycle and writable layer.
Preparing this page…
Your current navigation and account state stay available while the next page loads.
Practice Docker and Kubernetes interview scenarios in a guided browser simulation. No containers, clusters, cloud accounts, or arbitrary workloads are created.
An image is the packaged, read-only template. A container is a runnable instance with its own lifecycle and writable layer.
Dockerfile instructions such as FROM, COPY, RUN, USER, and CMD build image layers; instruction order affects cache reuse.
Publishing maps a host port to a container port. Containers on a user-defined bridge can resolve each other by name without publishing internal ports.
A named volume has a lifecycle outside its containers, so replacing a container does not remove the volume's data.
Follow these in order for the shortest path through the official beginner concepts.
Pull a small image, run a container, read its logs, execute a command, stop it, and remove it.
Start lessonTurn a simple Dockerfile into a tagged image, then run and inspect a container created from it.
Start lessonPull an image, start a named container, and expose it on localhost.
Start lessonCreate a user-defined bridge, attach a database, and resolve the container by name from a peer.
Start lessonWrite data, remove its container, and prove that a replacement can read the same volume.
Start lessonThe command interpreter runs in a Web Worker separated from the page DOM. It accepts only bounded, structured lesson messages, and the page validates returned state before saving it locally. It does not run Docker, Kubernetes, shell commands, images, YAML, networks, or user code. Output is lesson-authored and deterministic.