Pushing Docker Images One by One
Backward Compatibility
To learn how the standard Docker Pull REST API functions in Artifactory 7.21.3, see Pushing Multi-Architecture Docker Images Using Docker Build.
You can push multi-architecture Docker images, using a 'Manifest Lists
' file, (officially referred to as the ‘fat manifest file
’ by Docker), which references image manifests for platform-specific versions of an image. For more information, click here.
The process of pushing multi-architecture Docker images is similar to the standard Docker Push process, with a few exceptions:
- Each architecture gets a different tag.
- After all of the architectures have been built and pushed, a single ‘
fat manifest file
' is created that contains all of the images with the relevant tagging. - After pushing the
'fat
manifest file'
, the images are published with the given tags.
$ docker build -t domain/docker/multiarch-image:amd64 --build-arg ARCH=amd64/<docker_file> $ docker push domain/docker/multiarch-image:amd64 $ docker build -t domain_name: port/docker/multiarch-image:arm64 --build-arg ARCH=arm64/<docker_file> $ docker push domain/docker/multiarch-image:arm64 $ docker manifest create \ domain_name:port1/docker/multiarch-image:tag \ --amend domain/docker/multiarch-image:amd64 \ --amend domain/docker/multiarch-image:arm64 \ $ docker manifest push domain/docker/multiarch-image:my-tag
Pushing Images in Bulk Using the Docker Buildx CLI
From Artifactory 7.21.2 and higher, Artifactory supports the Docker buildx
command, allowing you to create and upload Docker ‘manifest lists
’ to the Docker registry in Artifactory. Docker
buildx
allows you to build and push multi-architecture images using a single command instead of having to build and push each of the architecture images separately. For more information, see Working with buildx.
To support Docker buildx
, Artifactory saves each architecture of the image under the following path structure, together with the tag that includes the originally published tag, the image operating system, and the image architecture.
imageName:tag-os-arch
The following example shows the Docker buildx
API usage.
docker buildx build --platform linux/amd64,linux/arm64 --tag domain/docker/multiarch-image:tag --output=type=image,push=true --push .
Pushing Multi-Architecture Docker Images Using Docker Build
From Artifactory version 7.21.3 and higher, if you continue to push multi-architecture Docker images using Docker build
, all your pushed images will be duplicated, and the architecture tag will be automatically added to each image.
In the following example, pushing the following images using Docker Build will result in Artifactory automatically duplicating the images and adding the linux
tag to each image.
List Manifest
docker.artifactory.<domain_name>/test/busybox:1.33
Image A
Image A is pushed during the build.
docker.artifactory<domain_name>/test/busybox:1.33-amd64
Artifactory duplicates the image and adds the
'linux'
tag.docker.artifactory.<domain_name>/test/busybox:1.33-linux-amd64
Image B
Image B is pushed during the build.
docker.artifactory.<domain_name>/test/busybox:1.33-s390x
Artifactory duplicates the image and adds the '
linux'
tag.artifactory.us..<domain_name>/test/busybox:1.33-linux-s390x