JFrog CLI bdc command to support a list.manifest.json when using Docker buildx build command
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.
Hey, any news on this? We have a big issue on our side as well
Yes with the world going multi-arch this would be extremely important to support.
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 \
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
This issue was closed due to 7 days of inactivity after being marked as stale. Feel free to reopen it if it remains relevant.