Push Multi-Architecture Docker Images with BuildX

JFrog Artifactory Documentation

Products
JFrog Artifactory
Content Type
User Guide

Docker Buildx is a plugin for the Docker CLI that extends the core docker build command with advanced features powered by Moby BuildKit. You can use BuildX to easily build and push multi-architecture images with a single command.

To build and push multi-architecture images with BuildX:

  1. Run this command to open a new builder instance that you can use to build images for multiple architectures:

    docker buildx create --use
  2. Build and publish multiple images by running the following command:

    docker buildx build --platform <ARCHITECTURES> -t [JFrogPlatformURL]/<REPO_NAME>/<IMAGE>:<TAG> . --push

    Where:

    • <ARCHITECTURES>: A comma-separated list of the operating system and CPU combinations you want to build

    • [JFrogPlatformURL]: The URL of your JPD, without the protocol schema

    • <REPO_NAME>: The repository where the image is located

    • <IMAGE>: The image name

    • <TAG>: The tags identifying the version of the image you want to pull

    For example:

    docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7,linux/s390x,linux/ppc64le -t company.jfrog.io/docker-local/froggy-app:v1.0.0 . --push