youhoc
Docker

icon picker
Container Image

An Image is:
app code & binaries & dependencies
Metadata about the image and how to run it
An image is NOT:
NOT a full OS, no kernel
An image:
nginx → offocial
bitnami/nginx → username of person or org who modify the docker
Notes on Image Files, for ex nginx
latest (for e.g. 1..11.9, mainline, 1, 1.11)
1.11.9-alpine (smallest, lightest version of linux with nginx)
1.10.3: standard, stable
1.10.3-alpine: stable, smallest
Image Layers
# inspect what's inside an image
docker history nginx:latest

# read metadata of an image
docker inspect nginx
Image name:
<user>/<repo>:<tag>
Change tag of an image
# download image
docker pull nginx

# change its tag, create a new image (username must match account)
docker image tag nginx brvnnghi/nginx:v1

# push to private Docker Hub
docker image push brvnnghi/nginx:v1
Build an image
Need a dockerfile
# this shows how we can extend/change an existing official image from Docker Hub

FROM nginx:latest
# highly recommend you always pin versions for anything beyond dev/learn

WORKDIR /usr/share/nginx/html
# change working directory to root of nginx webhost
# using WORKDIR is preferred to using 'RUN cd /some/path'

COPY index.html index.html

# I don't have to specify EXPOSE or CMD because they're in my FROM
# -t = target
# -f = file to build other than dockerfile
docker image build -t custom-nginx .

Buildx Extension

Installed a 64-bit version of Ubuntu 24.04 on Lightsail.
Installed Docker Linux 28.3.3
Pull an image from Docker Hub (brvnnghi/nginx:v4) but couldn’t run.
Error & Explain:
The error message "no matching manifest for linux/amd64 in the manifest list entries" indicates that your Docker host (the machine running Docker) cannot find an image built specifically for its architecture, which it expects to be linux/amd64.
Since you're able to run official Docker containers, this usually implies the official containers are multi-architecture, or happen to be compatible with your system. However, your public Docker images likely lack this multi-architecture support.
Understanding the problem
Multi-architecture images: Docker images can be built to support multiple architectures (e.g., linux/amd64 for Intel/AMD processors, linux/arm64 for ARM processors like Apple M-series or AWS Graviton). A single image tag can point to a list of different images, each built for a specific architecture.
Your Docker host's architecture: Docker is looking for an image that matches your host's architecture (linux/amd64).
Missing manifest entry: The error indicates that the image you're trying to run (your public Docker image) doesn't have an entry in its manifest list that matches your host's architecture. This means your image was likely built for a different architecture, or it wasn't built to support multiple architectures.

Steps to resolve the issue

To fix this, you need to build your Docker images to support the linux/amd64 architecture (and potentially other architectures like linux/arm64 if you want them to be runnable on different systems). The recommended tool for this is Docker Buildx.
#1 Ensure Docker Buildx is available:
Buildx comes with Docker Desktop on Mac and Windows, and with recent Docker CLI versions on Linux.
What is Buildx? Buildx is an extension of the Docker command that utilizes the BuildKit engine. It provides advanced features for building Docker images, enabling multi-platform builds, caching mechanisms, and using various builders.
#2 Create a Buildx builder instance:
If you haven't already, create a new Buildx builder instance to enable multi-architecture builds.
Inspect the builder:
Verify the builder is set up and supports the desired platforms.
#3 Build and push the multi-architecture image:
Use the docker buildx build command to build your image for multiple architectures and push it to your registry (e.g., Docker Hub).
--platform: Specifies the target platforms.
-t: Tags the image.
--push: Build and pushes the multi-architecture image and manifest to your Docker registry.
--load: Build and load the multi-architecture image and manifest to your local Docker.
#4 Run the image:
Once the multi-architecture image is pushed, try running it on your Linux/AMD64 host. Docker will automatically pull the correct image for your architecture.

Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.