Configure BuildX To Work With Artifactory

JFrog Artifactory Documentation

Products
JFrog Artifactory
Content Type
User Guide
ft:sourceType
Paligo

BuildX is a Docker CLI plugin that allows support for multi-platform images and signed images, using the OCI specification. BuildX allows developers to build and push images for multiple platforms and architectures using a single command, which makes for a more effective and efficient development process.

To configure BuildX to work with Artifactory, log in using the following Docker command:

Note

Make sure to replace the placeholder in bold with your own JFrog host domain.

docker login <YOUR_JFROG_DOMAIN>

For example:

docker login my-awesome.jfrog.io
Push OCI Resources Using BuildX

You can use the BuildX client to push multiple architecture or single architecture images.

To push OCI resources using Buildx:

  1. Create and use a builder instance using the following Docker BuildX command:

    docker buildx create --use
  2. Build and push multiple images using the following command:

    Note

    Make sure to replace the placeholders in bold with your own architectures, JFrog host domain, desired repository path, image, and tag.

    docker buildx build --platform <ARCHITECTURE_1>,<ARCHITECTURE_2> -t <YOUR_JFROG_DOMAIN>/<REPOSITORY>/<IMAGE>:<TAG> . --push

    For example:

    docker buildx build --platform linux/amd64,linux/arm64 -t my-awesome.jfrog.io/myproject-oci-remote/myociimage:latest . --push