Containers & orchestrationBeginner8h

Docker basics.

Images, containers, registries, and reproducible runtimes.

What is Docker?

Docker packages an application with everything it needs into an image, which runs as an isolated container. The same image runs identically on a laptop, in CI, and in production — solving the "works on my machine" problem that plagues deployment.

Why it matters

Containers are the unit of modern deployment. Kubernetes, CI runners, and most cloud platforms all speak Docker images. Understanding images, layers, and containers is the gateway to everything else in this stage, and to operating infrastructure at scale.

What to learn

  • Images vs containers vs registries
  • Pulling, running, and inspecting containers
  • The Dockerfile and building an image
  • Layers and the build cache
  • Volumes for persistent data
  • Port mapping and container networking basics
  • Tagging and pushing to a registry

Common pitfall

Treating a container like a long-lived server you SSH into and modify. Containers are meant to be disposable and rebuilt from the image — any change you make by hand vanishes on restart. Bake changes into the image via the Dockerfile, and keep state in volumes or external services.

Resources

Primary (free):

Practice

Write a Dockerfile for a small app, build the image, and run it as a container with a mapped port. Change a line, rebuild, and watch which layers are cached. Push the image to a registry and pull it on a clean machine. Done when the same image runs the same way in two places.

Outcomes

  • Explain images, containers, and registries.
  • Build an image from a Dockerfile and run it.
  • Use the layer cache to speed up rebuilds.
  • Persist data with volumes instead of in the container.
Back to DevOps roadmap