What is a Docker image and what is a container?

Prepare for the MP Deployment Exam 2. Ace your exam with targeted flashcards and practice questions, complete with hints and explanations. Boost your skills for test day!

Multiple Choice

What is a Docker image and what is a container?

Explanation:
At the heart of this distinction is that a Docker image is a static blueprint, while a container is a runnable instance created from that blueprint. The image bundles the app code, its dependencies, and configuration in a read-only, shareable template. It’s immutable and can be versioned, built from a Dockerfile, and stored in registries so others can pull it. A container, on the other hand, is the live runtime created from an image. It has its own writable layer on top of the image, its own network and process namespace, and it can be started, stopped, paused, or removed. Multiple containers can run from the same image, each with its own state and data, but all sharing the same underlying image template. That’s why this option is the best match: the image is a static template, and the container is the runnable instance built from that image. The other descriptions mix up roles (for example, treating an image as a running process or a container as a storage volume), which isn’t how Docker concepts work.

At the heart of this distinction is that a Docker image is a static blueprint, while a container is a runnable instance created from that blueprint. The image bundles the app code, its dependencies, and configuration in a read-only, shareable template. It’s immutable and can be versioned, built from a Dockerfile, and stored in registries so others can pull it.

A container, on the other hand, is the live runtime created from an image. It has its own writable layer on top of the image, its own network and process namespace, and it can be started, stopped, paused, or removed. Multiple containers can run from the same image, each with its own state and data, but all sharing the same underlying image template.

That’s why this option is the best match: the image is a static template, and the container is the runnable instance built from that image. The other descriptions mix up roles (for example, treating an image as a running process or a container as a storage volume), which isn’t how Docker concepts work.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy