Closed ArnaudPalgen closed 11 months ago
What registry are you using? The response you get:
time="2023-02-27T09:05:16Z" level=debug msg="unexpected response" body="{\"errors\":[{\"code\":\"UNKNOWN\",\"message\":\"unknown\",\"detail\":null}]}"
This looks very strange - getting a 500 response in an internal registry seems like an external problem - I don't suppose you have logs from your registry that you can share?
What registry are you using? The response you get:
time="2023-02-27T09:05:16Z" level=debug msg="unexpected response" body="{\"errors\":[{\"code\":\"UNKNOWN\",\"message\":\"unknown\",\"detail\":null}]}"
This looks very strange - getting a 500 response in an internal registry seems like an external problem - I don't suppose you have logs from your registry that you can share?
The problem is not with my repository. I tried on Gitlab and I have the same problem except that Gitlab gives me a 404 error. When I use docker build
, I have no problem.
Out of curiosity, does setting --provenance=false
succeed?
Out of curiosity, does setting
--provenance=false
succeed?
Yes ! But why ?
I suspect it's something to do with an older registry that doesn't support OCI images (the standard that the industry is moving to, instead of docker-specific media types). With BuildKit v0.11, we produce attestations, which automatically require using OCI media types.
Asked again - what's the software powering your registry? From your logs I'm guessing harbor? If so, that seems similar to https://github.com/docker/build-push-action/issues/780#issuecomment-1408361775, my suggested solution for that was:
What version of harbor registry are you using? I suspect it's likely you're using version 1? Harbor v2 has been out since 2020, and was one of the first registries to support the OCI image and distribution standards. I'd recommend an upgrade to the latest version - this should fix your issue without needing to set provenance: false.
Does pushing to GitLab with --provenance=false
work? If it still doesn't, that's a separate issue. I've not seen any users struggling with pushing to GitLab, 404s are a not-found error, maybe a typo or something in the registry name?
Sorry, the repository is Nexus OSS 3.30.1-01
Note that a few months ago, I was able to push multi-architecture images built with buildx without any problem.
I have the same problem And I am trying to use the nexus registry, but I am facing the same error And finally I had to use docker private registry https://docs.docker.com/registry/
Sorry, the repository is Nexus OSS 3.30.1-01
Note that a few months ago, I was able to push multi-architecture images built with buildx without any problem.
Nexus supports OCI index spec since 3.47.1, see https://github.com/docker/build-push-action/pull/800 and our e2e tests: https://github.com/docker/build-push-action/actions/runs/6453977865/job/17518599615#step:11:393
Like @jedevc said, you can disable provenance if you registry does not support OCI index.
Out of curiosity, does setting
--provenance=false
succeed?
Work for me , thanks
Contributing guidelines
I've found a bug and checked that ...
Description
I'm trying to build and upload a docker image to a private repository.
No problem when I export the image locally on my machine.
I have seen several issues of this kind, but none of them solved the problem. Maybe someone has a list of things to do for this kind of issue ?
Expected behaviour
The image is sent to the repository.
Actual behaviour
I have the following error:
Buildx version
github.com/docker/buildx v0.10.0 876462897612d36679153c3414f7689626251501
Docker info
No response
Builders list
Configuration
To be sure that the bugs does not come from my Dockerfile, I tested with an example Dockerfile that's comes from https://docs.docker.com/language/python/build-images/
The following command is used:
Logs
Additional info
I have tried the following things (not in order):
docker buildx prune
.docker
directory and restart docker