Sign in
GUIDE 08 / Deployment

From code to container image.Know what you are releasing.

Learn the difference between source code, images, registries, tags and digests through a visual release pipeline.

THE SHORT VERSION

An image packages the files needed to create a container.

A registry stores and distributes images.

Tags can move; a digest identifies specific image content.

01 / Images & registries

Your source code is only part of the package.

An application may depend on a runtime, system libraries and built assets. A container image packages the filesystem and metadata used to create a container. The Dockerfile is the build recipe; the image is an output of that build.

Imagine releasing a booking application. Sending only its source folder to a server would leave several questions open. Which runtime is installed? Were assets compiled? Which libraries are present? Packaging a reviewed image makes those choices part of a versioned artifact, while runtime configuration remains a separate concern.

02 / Images & registries

Build, publish, pull, run.

A registry is a distribution point for images. A build process can publish an image to a repository there; an authorized deployment environment can retrieve it. Running the image creates a container. Publishing an image alone does not update an application already running on a server.

Follow the pipeline below. Each stage has a different output, from source to artifact to a running process. A deployment record should connect these stages so that an operator can tell which reviewed build is serving requests and where it came from.

INTERACTIVE EXPLAINERA release moves through different forms.
A release moves through different forms.
Source
Image
Registry·
Container·
BUILD OUTPUTApplication image / release 12sha256:7f3a…c921 (shortened illustration)

Build the application artifact and test the result before distribution. Runtime secrets and customer data are not image ingredients.

Source
Image
Registry
Container·
REGISTRY REFERENCEstudio/portal:release-12sha256:7f3a…c921 (shortened illustration)

Publishing stores the artifact in a registry. A tag provides a readable reference; record the resolved digest for a precise identity.

Source
Image
Registry
Container
DEPLOYMENT RECORDRelease 12 → server 02sha256:7f3a…c921 (shortened illustration)

The target retrieves the selected artifact and creates a container with runtime configuration. Publishing a newer tag does not itself update this running instance.

Conceptual example · explore each state
03 / Images & registries

A readable label and an exact identity.

A tag is a human-readable reference such as release-12. Depending on registry policy, a publisher can update a tag to refer to different content. A digest is a content identifier: referencing the same digest selects that specific artifact rather than whatever a movable tag points to today.

For a release record, keep both the friendly name and the resolved identity. This makes a later investigation more precise. An exact identity still does not establish that the contents are trustworthy; you also need to know the source and how the artifact was built and reviewed.

Reference: Docker: image digests
A readable label and an exact identity.
TermThink of it asImportant distinction
DockerfileBuild recipeNeeds inputs and a build process
ImagePackaged application artifactDoes not run until instantiated
TagReadable referenceMay point to new content later
DigestContent identityIdentifies a particular artifact
04 / Images & registries

Include what the runtime actually needs.

A build can use compilers and tools that the final application does not need. Multi-stage builds separate those activities, letting the runtime image contain the result without every build dependency. Selecting a suitable base image also shapes the package you maintain.

Keep secrets and unrelated local files out of the build context and final image. Review the inputs, test the resulting application, and schedule rebuilds when dependencies need updates. A successful build tells you that a recipe completed; it does not by itself prove that the application is correct or safe.

Reference: Docker: building best practices
05 / Images & registries

Make the release easy to trace and replace.

For the booking application, record the image identity, configuration version and deployment destination together. If a release behaves differently from the previous one, those details narrow the investigation. They also help another person reproduce the intended setup without relying on memory.

Keep an explicit update process. Pinning an artifact makes selection predictable, but it does not bring in future fixes automatically. When replacing a release, consider application compatibility with stored data and dependent services. Reverting an image cannot necessarily reverse a database migration.

CLEAR UP THE DETAILS

Common questions.

Does latest always mean the newest version?

No. It is a tag name whose meaning depends on the publisher. Inspect the actual release and artifact identity.

Is an image the same as a container?

No. An image is an artifact. A container is an instance created from an image with runtime configuration.

Does a digest prove an image is safe?

No. It identifies content. Trust also depends on provenance, review, configuration and maintenance.

WHERE DOCKOCK FITS

Connect the concept to your work.

DOCKOCK connects application releases to their deployment targets, making it easier to review the image and configuration behind a service.

Explore images & registries in DOCKOCK

Keep learning from the source.

Further reading from the teams and documentation behind these technologies.

Docker: image digestsDocker: building best practices
CONTINUE EXPLORING

What does HTTPS protect?

See how a name, a certificate and encryption work together.

Read the next guide