-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Multiarch Docker container #8225
Description
Currently the docker containers are built for various architectures, but they are tagged separately. This means that an end user needs to know their architecture tag, when they want to run docker run certbot/certbot:architecture-tag
A more appropriate way to do this is by using Docker manifest that packages multiple images under the same tag. Most widely used images are currently using this technique. See nginx for example:

Moving to this new behavior is quite simple using buildx. A simple build and push that used to be like this:
docker build -t myuser/myimage:tag .
docker push myuser/myimage:tag
will change to
export DOCKER_CLI_EXPERIMENTAL=enabled
docker buildx create --name mybuilder
docker buildx use mybuilder
docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t myuser/myimage:tag --push .
It is worth noting that the buildx is quite stable. It is, in fact, powering the standard docker build command. The only reason that is part of the experimental package, AFAIK, is that Docker is not committing to keeping the same CLI signature - this should be fine for a build process. They haven't change the CLI args in the past year, even if they do, Cerbot docker needs to update the build script. No risk to the builds.