Docker Config Reference (docker manifest)

We go over using the docker manifest command!

Docker Config Reference (docker manifest)
docker manifest examples
docker manifest inspect nginx:latest

This command inspects the manifest of the latest Nginx image from Docker Hub, displaying details such as the architecture, operating system, and digest for each platform variant. It provides insight into whether the image supports multi-architecture configurations, which is essential for ensuring compatibility across different hardware environments.

docker manifest inspect --verbose nginx:latest

Utilizing the --verbose flag, this command retrieves and displays extended information about the manifest of the Nginx latest image, including more granular details on layers and configurations. This option is valuable for in-depth analysis during debugging or when verifying image integrity.

docker manifest create mymanifest nginx:amd64 nginx:arm64

This command creates a new manifest list named "mymanifest" by combining the AMD64 and ARM64 variants of the Nginx image. It enables the construction of a multi-platform image, allowing Docker to select the appropriate architecture at runtime based on the host system.

docker manifest annotate mymanifest nginx:arm64 --os linux --arch arm64

The annotate subcommand modifies the manifest "mymanifest" by adding annotations to the ARM64 variant of the Nginx image, specifying the operating system as Linux and architecture as ARM64. This ensures accurate metadata for platform-specific handling.

docker manifest push mymanifest

This command pushes the manifest list "mymanifest" to the default registry (Docker Hub), making the multi-architecture image available for pulling. It is a critical step after creating or annotating a manifest to deploy it remotely.

docker manifest rm mymanifest

Employing the experimental rm subcommand, this removes the local manifest list "mymanifest". This is useful for cleaning up unused manifests to free local storage, though it requires enabling experimental features in the Docker configuration.

docker manifest inspect hello-world

This inspects the manifest of the hello-world image, revealing its simple structure often used for testing. It highlights minimal multi-architecture support, aiding in basic verification of Docker installations across platforms.

docker manifest inspect alpine

The command examines the manifest of the Alpine image, detailing its lightweight design and multi-platform variants. This is beneficial for developers optimizing for size in embedded or resource-constrained environments.

docker manifest create testmanifest busybox:amd64 busybox:arm64

This creates a manifest list "testmanifest" from AMD64 and ARM64 Busybox variants, facilitating testing of multi-architecture setups in minimalistic utility images.

docker manifest annotate testmanifest busybox:arm64 --variant v8

Annotating the ARM64 variant in "testmanifest", this adds a variant specifier (v8) for more precise architecture targeting, such as distinguishing ARM versions for compatibility.

docker manifest push --purge testmanifest

This pushes "testmanifest" to the registry and uses --purge to remove the local copy afterward, streamlining workflows by automating cleanup post-deployment.

docker manifest inspect --insecure myregistry.com/image

With --insecure, this inspects a manifest from an insecure registry (e.g., without TLS), useful in controlled environments but not recommended for production due to security risks.

docker manifest create --amend mymanifest additional:image

The --amend flag allows modification of an existing "mymanifest" by adding another image reference, enabling iterative updates to manifest lists without recreation.

docker manifest annotate mymanifest image --os-features feature1

This annotates a specific image in "mymanifest" with OS features, providing additional metadata for advanced runtime decisions or compatibility checks.

docker manifest inspect golang:1.20

Inspecting the Go 1.20 image manifest reveals its multi-platform support, assisting Go developers in ensuring cross-architecture builds for applications.

docker manifest create multimani ubuntu:amd64 ubuntu:arm64

Creating "multimani" from Ubuntu variants supports building base images for diverse hardware, common in cloud and edge computing scenarios.

docker manifest push multimani

Pushing "multimani" deploys the multi-platform Ubuntu manifest, ensuring availability for heterogeneous clusters.

docker manifest rm multimani

This removes the local "multimani" manifest, aiding in resource management when experimental features are enabled.

docker manifest inspect python:3.10

The inspection of Python 3.10's manifest details its architecture variants, valuable for data science or web development across platforms.

docker manifest annotate mymanifest image --arch amd64

Annotating with architecture (AMD64) ensures the manifest accurately reflects the platform, correcting or specifying details post-creation.

docker manifest create --insecure insecuremanifest insecure:image

Using --insecure, this creates a manifest from an insecure source, applicable in testing but cautioned against in secure environments.

docker manifest push --insecure insecuremanifest

This pushes "insecuremanifest" to an insecure registry, bypassing TLS for development or legacy systems.

docker manifest inspect redis:latest

Inspecting Redis latest manifest shows caching server variants, supporting deployment in multi-arch Redis clusters.

docker manifest create dbmanifest mysql:amd64 mysql:arm64

Creating "dbmanifest" for MySQL variants enables multi-platform database images for scalable applications.

docker manifest annotate dbmanifest mysql:arm64 --os linux

Annotating the ARM64 MySQL with OS (Linux) refines metadata for database-specific deployments.

docker manifest push dbmanifest

Pushing "dbmanifest" makes the multi-arch MySQL available, enhancing database portability.

docker manifest inspect mongo:latest

This inspects MongoDB latest manifest, detailing document database variants for NoSQL applications.

docker manifest create appmanifest node:amd64 node:arm64

Creating "appmanifest" for Node.js variants supports JavaScript runtime across architectures.

docker manifest annotate appmanifest node:arm64 --variant v7

Annotating with variant (v7) specifies ARM details for Node.js, ensuring precise targeting.

docker manifest --help

This displays help documentation for the manifest command, including subcommands and options, serving as a reference for users exploring functionality.