Comparison

Container images and running containers

A container image is a packaged template, while a container is a running or stopped instance created from an image with runtime settings.

At a glance

Image
Packaged template for an application environment
Container
An instance created from an image

Overview

A container image is a packaged template, while a container is a running or stopped instance created from an image with runtime settings. Keeping those concepts separate clarifies how an application is distributed, configured, replaced, and connected to persistent data.

What differs

An image contains packaged files and defaults. A container adds runtime configuration and a writable environment, so the same image can create multiple instances with different settings and state.

Choose by the task

Rebuild or select an image when changing the packaged application. Change container configuration when adjusting runtime environment values, network connections, or mounted storage.

Common confusion

Editing files inside one container does not automatically update the distributed image. Data that must survive container replacement needs an explicit storage and backup plan.

Sources and review

MOOR's explanatory text is supported by the following source links.

  1. What is an image? — Docker
  2. What is a container? — Docker

Browse MOOR Knowledge