jfrog-cli icon indicating copy to clipboard operation
jfrog-cli copied to clipboard

JFrog CLI bdc command to support a list.manifest.json when using Docker buildx build command

Open elinafl opened this issue 4 years ago • 3 comments

When pushing multi-architecture images to Artifactory, an image with the mentioned tag is created, alongside additional images with tags matching the original tag with the architecture as a suffix. For example, this command will create 3 tags in Artifactory: docker buildx build --file Dockerfile --platform linux/amd64,linux/arm64 --tag <Artifactory_host>/workshop-docker/tdp/multi-arch-test:1.1-rc --output=type=image --push .

The tags created are: 1.1-rc tag, 1.1-rc-linux-amd64 and 1.1-rc-linux-arm64. When adding the docker image, which is already published to Artifactory, to the build-info using the jfrog rt bdc command, we need to provide the manifest.json SHA value with the --image-file flag. This will add the image with the original tag, but not the other tags.

Customers would like to have the ability to link the list.manifest.json as well to have all the images with all the additionally created tags to be added to the build-info before publishing it, since the additional tags are not known in advance and currently each manifest on each image tag needs to be added separately to the same build.

elinafl avatar Aug 30 '21 13:08 elinafl

Hey, any news on this? We have a big issue on our side as well

V0lantis avatar Oct 07 '23 09:10 V0lantis

Yes with the world going multi-arch this would be extremely important to support.

ryancurrah avatar Nov 01 '23 19:11 ryancurrah

Hey, I found a WA that enables you to index all the docker layers into the build-info.

Basically, I pull the just-pushed image (since it is not in docker images), filter only relevant images, format them as jf rt bdc require, and lastly, add them one by one to the build-info.

    DOCKER_BASE: artifactory.company.com/docker
    DOCKER_IMAGE_NAME: $DOCKER_BASE/<your conventions>
    ...
    - docker build ... -t $DOCKER_IMAGE_NAME --push .
    - |
      # 🐸 Adding pushed image to build-info...
      docker pull $DOCKER_IMAGE_NAME
      docker images --format "{{.Repository}}:{{.Tag}}@{{.Digest}}" | grep $DOCKER_BASE | \
      while read line ; do \
        echo -e "\e[1;32m🐸 Add $line to build-info...\e[0m" && \
        echo $line > image.txt && \
        jf rt build-docker-create docker-local --image-file image.txt \
      ; done \

chkp-roniz avatar Jun 26 '24 11:06 chkp-roniz

This issue has been marked as stale due to 6 months of inactivity. As part of our effort to address every issue properly, please feel free to remove the stale label or keep this issue active by leaving a comment. Otherwise, it will be closed in 7 days

github-actions[bot] avatar Sep 23 '25 07:09 github-actions[bot]

This issue was closed due to 7 days of inactivity after being marked as stale. Feel free to reopen it if it remains relevant.

github-actions[bot] avatar Oct 08 '25 00:10 github-actions[bot]