You can push multi-architecture Docker images, using a manifest list file, or fat manifest, which references image manifests for platform-specific versions of an image.
Starting from Artifactory 7.21.2, you can also push multi-architecture images with Docker BuildX. For more information, see Push Multi-Architecture Docker Images with BuildX.
For each architecture you want to include in the final multiple-architecture image, build the image by running this command:
docker build -t [JFrogPlatformURL]/<REPO_NAME>/<IMAGE>:<TAG> --build-arg ARCH=<ARCHITECTURE> <DOCKER_FILE>Where:
[JFrogPlatformURL]: The URL of your JPD, without the protocol schema<REPO_NAME>: The name of the repository where the image is located<IMAGE>: The image name<TAG>: The tags you want to apply to the image<ARCHITECTURE>: The architecture you want to build for<DOCKER_FILE>: The path to the Docker file
For example:
docker build -t company.jfrog.io/docker-local/froggy-app:v1.0.0 --build-arg ARCH=amd64 .For each image you built, push it to Artifactory by running this command:
docker push [JFrogPlatformURL]/<REPO_NAME>/<IMAGE>:<TAG>Where:
[JFrogPlatformURL]: The URL of your JPD, without the protocol schema<REPO_NAME>: The name of the target repository<IMAGE>: The image name<TAG>: The tags you want to apply to the image
For example:
docker push company.jfrog.io/docker-local/froggy-app:v1.0.0Run the following command to create a local manifest file, referencing all the platform-specific images you just built:
docker manifest create \ [JFrogPlatformURL]/<REPO_NAME>/<MULTI_IMAGE>:<TAG> \ --amend [JFrogPlatformURL]/<REPO_NAME>/<PLATFORM_IMAGE1>:<TAG> \ --amend [JFrogPlatformURL]/<REPO_NAME>/<PLATFORM_IMAGE2>:<TAG>
Where:
[JFrogPlatformURL]: The URL of your JPD, without the protocol schema<REPO_NAME>: The name of the target repository<MULTI_IMAGE>: The name of the multiple architecture image you want to build<TAG>: The tags you want to apply to the image<PLATFORM_IMAGE>: The name of the platform-specific image you built
Note
Add a new
--amendfor each image you want to include in the multi-architecture image.For example:
docker manifest create \ company.jfrog.io/docker-local/multiarch-image:latest \ --amend company.jfrog.io/docker-local/froggy-app:v1.0.0 \ --amend company.jfrog.io/docker-local/swamp-app:v2.2.1
Run the following command:
docker manifest push [JFrogPlatformURL]/<REPO_NAME>/<MULTI_IMAGE>:<TAG>Where:
[JFrogPlatformURL]: The URL of your JPD, without the protocol schema<REPO_NAME>: The name of the target repository<MULTI_IMAGE>: The multi-architecture image name<TAG>: The tags you want to apply to the image
For example:
docker manifest push company.jfrog.io/docker-local/multiarch-image:latest
Multi-Architecture Tagging
Starting from Artifactory version 7.21.2, when you push a platform-specific Docker image, the server automatically adds a second descriptive tag that includes the operating system.
For example, when you push my-app:1.0-amd64, Artifactory publishes my-app:1.0-linux-amd64.