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

No error when adding index annotations using docker exporter and docker driver #2605

Open
3 tasks done
dvdksn opened this issue Jul 16, 2024 · 2 comments
Open
3 tasks done
Labels
kind/bug Something isn't working
Milestone

Comments

@dvdksn
Copy link
Contributor

dvdksn commented Jul 16, 2024

Contributing guidelines

I've found a bug and checked that ...

  • ... the documentation does not mention anything about my problem
  • ... there are no open or closed issues that are related to my problem

Description

Building an image with the docker builder, while also trying to add annotations to index, doesn't result in an error.

Expected behaviour

When trying to build an image with annotations on index, using a docker-container builder, my build fails as expected if I try to use the docker exporter.

$ docker buildx b --builder container --annotation "index:foo=bar" --output type=docker .
...
 => ERROR exporting to docker image format                                                     0.0s
 => => exporting layers                                                                        0.0s
------
 > exporting to docker image format:
------
ERROR: failed to build: failed to solve: index annotations not supported for single platform export

Actual behaviour

$ docker buildx b --builder desktop-linux --annotation "index:foo=bar" .
[+] Building 1.2s (9/9) FINISHED                                               docker:desktop-linux
...
 => exporting to image                                                                         0.0s
 => => exporting layers                                                                        0.0s
 => => writing image sha256:a10a6248e2608c811b279aab218200dfe92795a7724c40616574edb30df6c1fc   0.0s

Buildx version

github.com/docker/buildx 3005743 3005743

Docker info

No response

Builders list

NAME/NODE              DRIVER/ENDPOINT     STATUS    BUILDKIT   PLATFORMS
container*             docker-container                         
 \_ container0          \_ desktop-linux   running   v0.14.1    linux/arm64, linux/amd64, linux/amd64/v2, linux/riscv64, linux/ppc64le, linux/s390x, linux/386, linux/mips64le, linux/mips64, linux/arm/v7, linux/arm/v6
default                docker                                   
 \_ default             \_ default         running   v0.14.1    linux/arm64, linux/amd64, linux/amd64/v2, linux/riscv64, linux/ppc64le, linux/s390x, linux/386, linux/mips64le, linux/mips64, linux/arm/v7, linux/arm/v6
desktop-linux          docker                                   
 \_ desktop-linux       \_ desktop-linux   running   v0.14.1    linux/arm64, linux/amd64, linux/amd64/v2, linux/riscv64, linux/ppc64le, linux/s390x, linux/386, linux/mips64le, linux/mips64, linux/arm/v7, linux/arm/v6
cloud-docker-default   cloud               error

Configuration

$ docker buildx b --builder desktop-linux --output type=docker --annotation "index:foo=bar" -<<< "FROM alpine"

Build logs

No response

Additional info

No response

@dvdksn dvdksn changed the title No error when adding index annotations using docker exporter No error when adding index annotations using docker exporter and docker driver Jul 16, 2024
@tonistiigi
Copy link
Member

Was this with containerd storage backend?

@dvdksn
Copy link
Contributor Author

dvdksn commented Jul 16, 2024

Both had the same issue in my tests

@crazy-max crazy-max added kind/bug Something isn't working and removed status/triage labels Jul 19, 2024
@crazy-max crazy-max added this to the v0.17.0 milestone Jul 19, 2024
@thompson-shaun thompson-shaun modified the milestones: v0.17.0, v0.18.0 Aug 8, 2024
@thompson-shaun thompson-shaun modified the milestones: v0.17.0, v0.18.0 Aug 29, 2024
@thompson-shaun thompson-shaun modified the milestones: v0.18.0, v0.19.0 Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants