An application may run on one laptop but fail elsewhere because libraries or settings differ. Docker packages an application and its runtime files into an image, then starts a container from that image.

The image is the reusable package; the container is a running instance with its own writable layer. A volume stores data separately from that container's lifetime. Use containers when you want a repeatable application environment, and explicitly choose what data should survive when the container is replaced.

Try it in a lab

Build a tiny local image, run it with a named container and explicit port mapping, then inspect its logs and process exit code. Recreate it from the same image and compare writable-layer changes with a mounted test volume.

Check your understanding

Explain what the image contains, which port is exposed to the host and where persistent data lives. Demonstrate clean shutdown and removal of only your lab resources.

Before you start

Do not expose the Docker socket to an untrusted container or put credentials into an image layer. Use a dedicated temporary test directory.

Read the official guide

Use the project documentation for version-specific commands and prerequisites. Record the versions and results of your own exercise. This page proposes a learning activity; it does not report a Kubedex test.

This is a newly written study reference at an address from the original Kubedex course outline. The original lesson was not recovered. It does not include course enrolment, progress tracking or a certificate.

Sources & further reading

  1. Primary learning documentation

Spotted something that needs another look?

Help improve this page →