Container Image and Container

A container image packages filesystem contents and execution metadata. A container is an instance created from an image, with runtime configuration and a writable layer. Several containers can start from the same image without sharing that writable layer.

A Linux container runs with a Linux kernel supplied by the host or a virtual machine. The image does not include every external dependency: CPU architecture, mounts, credentials, network services, and input versions still affect the job.

Removing a container removes its writable-layer data. Persist required output through an explicitly managed mount or external destination. Keeping an image is not a backup of the data produced by its containers.

The lifecycle is build or pull an image, create a container from it, start its process, then stop or remove the container. A stopped container can still exist with its writable layer; removal is the step that discards that layer. Changing a running container does not update the original image or other containers created from it. Rebuild an image to distribute a reviewed application change.

See Containerizing Data Jobs with Docker for a worked example.

Further reading


Discover more from Insightful Data Lab

Subscribe to get the latest posts sent to your email.

Similar Posts

Questions, corrections, or additional insights?

This site uses Akismet to reduce spam. Learn how your comment data is processed.