LESSON 01 / 4·2 min readIntermediate

Image vs container vs Dockerfile?

01 Understand02 Recall03 Prepare

Understand the concept

A Docker image packages a filesystem and configuration for starting an application. A container is an isolated process environment created from an image with a writable layer and runtime settings. A Dockerfile describes how the image is built, making the package reproducible rather than depending on manual server setup.

Important ideas

  • An image is the packaged filesystem and configuration for an app.

  • A container is an instance of that image; it may be running or stopped.

  • A Dockerfile describes image build steps; containers share the host kernel.

  • Containers share the host kernel; they are not full virtual machines with independent kernels.

PAUSE & RECALL

Can you explain it without the notes?

Image vs container vs Dockerfile?

Use your own words. Explain an example and one limitation before checking the explanation.

Check your explanation

A Docker image packages a filesystem and configuration for starting an application. A container is an isolated process environment created from an image with a writable layer and runtime settings. A Dockerfile describes how the image is built, making the package reproducible rather than depending on manual server setup.

CONNECT IT TO YOUR INTERVIEW

Turn this concept into a clear answer.

  • Distinguish build-time content from runtime configuration and persisted application data.
Practice this concept
YOUR NEXT STEP

Keep connecting the ideas.

Next lesson: What are layers and multi-stage builds?

Adapted from 09_TESTING_GIT_DOCKER_CLOUD.md · “Image vs container vs Dockerfile?”. Examples are study fragments; framework behavior can depend on your version.