Container Images
Container images are read-only templates containing an application's filesystem, libraries, and configuration, layered and stored as distributable artifacts. Understanding how images are built, stored in registries, and layered is essential to efficient container workflows.
itVirtualization, containers, and orchestration | OpenSkills.info
Intro
Container Images
A container image is a packaged filesystem plus instructions for starting a container. It gives you one named object to build, test, store, copy, and deploy.
The image is not the running application. It is the input that a container runtime uses to create a container. That distinction is the foundation for everything else in this course.
The problem an image solves
An application rarely consists of one executable. It may need a language runtime, shared libraries, certificates, configuration defaults, and static files. Installing those pieces by hand on every machine creates drift. Two machines can receive different versions or settings even when they are meant to run the same release.
An image packages the required files and runtime configuration together. You build it once, then move the same content through testing and deployment. The host still supplies a compatible kernel and container runtime. The image supplies the application environment above that kernel.
This gives you repeatable packaging, not universal portability. A Linux image does not include a Linux kernel. Its programs must match the operating system and processor architecture available at runtime.
Image, container, and registry
Keep three objects separate:
- An image is stored content and runtime configuration.
- A registry stores and distributes images.
- A container is a runtime instance created from an image.
The common flow is:
source + build instructions -> image -> registry -> runtime -> container
You can create many containers from one image. Each starts with the same image content. Runtime settings and writable state can differ between containers.
Continue the course
This section is part of the paid course.
See pricing to subscribe, or log in if you already have access.
Where this skill leads
Relevant careers
See how this topic contributes to broader role-level skill maps.
Sources
- https://specs.opencontainers.org/image-spec/
Supports
- OCI image goals and standard object model
- Image manifests, configuration, layers, descriptors, and indexes
- https://github.com/opencontainers/image-spec/blob/main/manifest.md
Supports
- Image manifest schema
- Configuration and ordered layer descriptors
- https://github.com/opencontainers/image-spec/blob/main/config.md
Supports
- Image execution parameters and platform fields
- Root filesystem layer identities and runtime defaults
- https://github.com/opencontainers/image-spec/blob/main/layer.md
Supports
- Filesystem changesets and ordered application
- Additions, modifications, removals, and whiteout behavior
- https://github.com/opencontainers/image-spec/blob/main/image-index.md
Supports
- Image indexes and manifest descriptors
- Operating system, architecture, and platform variant selection
- https://github.com/opencontainers/image-spec/blob/main/descriptor.md
Supports
- Descriptor media type, size, and digest fields
- Content addressability and independent digest verification
- https://github.com/opencontainers/distribution-spec/blob/main/spec.md
Supports
- Registry, repository, manifest, blob, tag, push, and pull definitions
- Standard content distribution and discovery API model
- https://docs.docker.com/get-started/docker-concepts/the-basics/what-is-an-image/
Supports
- Beginner image, immutability, and layer mental model
- Relationship between image packages and running containers
- https://docs.docker.com/get-started/docker-concepts/building-images/build-tag-and-publish-an-image/
Supports
- Image reference structure
- Build, tag, history inspection, and registry push workflow
- https://docs.docker.com/build/building/best-practices/
Supports
- Base image selection, minimal packages, build context exclusions, and cache use
- Regular rebuilds, mutable tags, digest pins, and continuous testing
- Multi-stage build guidance and secret-handling cautions
- https://docs.docker.com/build/building/multi-stage/
Supports
- Multiple build stages
- Copying selected artifacts into a focused final image
- https://docs.docker.com/build/building/multi-platform/
Supports
- Single-platform and multi-platform image structure
- Image index selection and platform build strategies
- https://csrc.nist.gov/pubs/sp/800/190/final
Supports
- Image and registry risks in the container threat model
- Image vulnerability, trust, configuration, and lifecycle concerns
