BuildX supports building and pushing images in two ways:
Push Single Images with BuildX
Run the following Docker command:
docker buildx build --platform <ARCHITECTURE> -t [JFrogPlatformURL]/<REPO_NAME>/<IMAGE>:<TAG> . --pushWhere:
<ARCHITECTURE>: The operating system and CPU architecture combination 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 company.jfrog.io/oci-local/froggy-app:v1.0.0 . --pushNote
You can also use JFrog Set me up to copy the snippet populated with your token and environment. For more information, see Use Artifactory Set Me Up for Configuring Package Manager Clients.
Push Multiple Images with BuildX
Run this command to open a new builder instance that you can use to build images for multiple architectures:
docker buildx create --use
Build and publish multiple images by running the following command:
docker buildx build --platform <ARCHITECTURES> -t [JFrogPlatformURL]/<REPO_NAME>/<IMAGE>:<TAG> . --pushWhere:
<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/oci-local/froggy-app:v1.0.0 . --push
Note
You can also use JFrog Set me up to copy the snippet populated with your token and environment. For more information, see Use Artifactory Set Me Up for Configuring Package Manager Clients.