Closed daltonv closed 9 months ago
I have the same problem without using multi-platforms
I am pushing images to two separate registries, including Github registry
- name: Build and push
id: docker_build
uses: docker/build-push-action@v4
with:
context: .
file: ${{ env.DOCKERFILE }}
platforms: linux/amd64
push: true
tags: |
${{ needs.prepare.outputs.image_fly }}${{ env.IMAGE_SUFFIX }}
${{ needs.prepare.outputs.image_github }}${{ env.IMAGE_SUFFIX }}
In github registry, I end up with the correct version for example image-repo-name:1.0.0
and two untagged versions
#12 exporting to image
#12 exporting layers
#12 exporting layers 17.8s done
#12 exporting manifest sha256:b1ee819a2e3d5896b86d8d87e242cee35566f20afbb527441c46f7b0d1480a06 0.0s done
#12 exporting config sha256:9d265a628e53ff77b40026a825fb59758f08eb9935ad42ab9bb95170fbdbf3a3
#12 exporting config sha256:9d265a628e53ff77b40026a825fb59758f08eb9935ad42ab9bb95170fbdbf3a3 done
#12 exporting attestation manifest sha256:8f6eb2770bfada4f266d37985611558f866d281d366cc659486975817d602296 done
#12 exporting manifest list sha256:7264527bd66a26218825ead8b63be68931267f02b45d2bc76a7a2c2943b0d4a1 done
#12 pushing layers
#12 ...
In this case for example, I get two other images with tags
b1ee819a2e3d5896b86d8d87e242cee35566f20afbb527441c46f7b0d1480a06
and
8f6eb2770bfada4f266d37985611558f866d281d366cc659486975817d602296
Does anyone know what triggers this behavior?
Are there any updates to this? I'm having the same problem...
Can you confirm that those aren't provenance attestations? Try adding this to your GH action & seeing if it solves the problem:
with:
provenance: false
I confirm @mattkrick solutions fixed our issue and removed the untagged layers from the images 👍
Can you confirm that those aren't provenance attestations?
Try adding this to your GH action & seeing if it solves the problem:
with: provenance: false
So for me that is not the issue as I already have that setting as false in my action I posted a above. Although I do know with that setting on single platform builds I get the same result.
I would hope there is at least an option to tag each platforms image with special tag. In the example above perhaps pr-5-arm64 and pr-5-amd64
Why? This was true before when manifest list was not a thing but now tools like Buildx/BuildKit create a manifest list including manifest for each built platform if there are more than one like ghcr.io/crazy-max/undock:0.3.0
: https://github.com/crazy-max/undock/pkgs/container/undock/17739760?tag=0.3.0
$ docker buildx imagetools inspect ghcr.io/crazy-max/undock:0.3.0
Name: ghcr.io/crazy-max/undock:0.3.0
MediaType: application/vnd.docker.distribution.manifest.list.v2+json
Digest: sha256:84e9ae779070e61c8ae866c0d5873baf1d4580774c61dc76ee3c35335519d2dd
Manifests:
Name: ghcr.io/crazy-max/undock:0.3.0@sha256:5fc3dac5677c54697a55f9ba35c423269d0f2e89b5417f647bc5b388eca606ef
MediaType: application/vnd.docker.distribution.manifest.v2+json
Platform: linux/amd64
Name: ghcr.io/crazy-max/undock:0.3.0@sha256:f8fec216d1c2797da68a10a2587f4e8b8891a5731e2d7be28d1e21db45515574
MediaType: application/vnd.docker.distribution.manifest.v2+json
Platform: linux/arm/v6
Name: ghcr.io/crazy-max/undock:0.3.0@sha256:eff8d18996daea3ccfc3803f7f5dc1c8ddc1cdb6fca69ff0bd2296e4c72511a9
MediaType: application/vnd.docker.distribution.manifest.v2+json
Platform: linux/arm/v7
Name: ghcr.io/crazy-max/undock:0.3.0@sha256:6cdc61722906c4d73450b40767dd9f034a0731837249b45703803e650ae93796
MediaType: application/vnd.docker.distribution.manifest.v2+json
Platform: linux/arm64
Name: ghcr.io/crazy-max/undock:0.3.0@sha256:3e2d1cc6995e0d17daa1bf69ae1c6b9ba974029de041fee6ae755203740ec72e
MediaType: application/vnd.docker.distribution.manifest.v2+json
Platform: linux/ppc64le
Name: ghcr.io/crazy-max/undock:0.3.0@sha256:d37a61625ba5bd8f89e6eb46fce5641149ca8b7245b56f20b254d959f14257ad
MediaType: application/vnd.docker.distribution.manifest.v2+json
Platform: linux/s390x
This way a user doesn't need to bother choosing a specific tag matching the platform. Then can just use this tag and the right image will be pulled based on the host specs.
More info: https://docs.docker.com/build/building/multi-platform/
I want that so I can automatically delete all images associated with a tag. There currently is no way to do this in multi arch builds.
Same issue here, and provenance: false
does not solve the issue.
Troubleshooting
Before submitting a bug report please read the Troubleshooting doc.
Behaviour
Multiplatform images produce untagged images for each platform built for
Steps to reproduce this issue
Expected behaviour
I would hope there is at least an option to tag each platforms image with special tag. In the example above perhaps pr-5-arm64 and pr-5-amd64
Actual behaviour
Multiple untagged images
Configuration