6.1.1.1 Creation Image Selection
A focused guide to Creation Image Selection, connecting core concepts with practical Docker and container operations.
Creation image selection is the step where a specific image — identified by name, tag, or digest — is chosen as the starting point for a new container, determining exactly what filesystem content and default configuration that container begins its life with.
Selecting an Image by Tag
The most common way to select an image specifies a name and tag together.
docker run -d myapp:1.0
This selects whatever image currently corresponds to the 1.0 tag at the moment the container is created.
Selecting an Image by Digest for Precision
Because tags can be reassigned to point to different image content over time, selecting by digest guarantees the exact image content used, regardless of what a tag might currently point to.
docker run -d myapp@sha256:a1b2c3d4...
What Happens if the Selected Image Isn't Present Locally
If the specified image is not already present on the local machine, Docker automatically attempts to pull it from the configured registry before proceeding with container creation.
docker run -d myapp:2.0
Unable to find image 'myapp:2.0' locally
2.0: Pulling from library/myapp
This pull happens transparently as part of fulfilling the image selection, assuming the image is actually available in the registry.
Selecting the Implicit Latest Tag
Omitting a tag entirely defaults to selecting the latest tag, which (despite its name) is not guaranteed to actually be the most recently published version unless that convention is specifically maintained.
docker run -d myapp
This is equivalent to explicitly specifying myapp:latest.
Why Careful Image Selection Matters
Exactly which image a container is created from determines everything about its initial state — being deliberate about whether to select by mutable tag or immutable digest, and understanding what happens when the selected image isn't already present locally, avoids subtle confusion about what a given container actually runs.