Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
elinafl opened this issue Aug 30, 2021 · 3 comments
Labels
feature request New feature or request

Comments

@elinafl
Copy link

elinafl commented Aug 30, 2021

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 elinafl added the feature request New feature or request label Aug 30, 2021
@V0lantis
Copy link

V0lantis commented Oct 7, 2023

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

@ryancurrah
Copy link

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

@chkp-roniz
Copy link

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 \

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants