buildkit
buildkit copied to clipboard
When pushing both http and https repositories: error: failed to solve: unexpected status: 404 Not Found
version
➜ buildctl --version buildctl github.com/moby/buildkit 0.10.3 c8d25d9a103b70dc300a4fd55e7e576472284e31
- repo1 is a secure repository (https)
- repo2 is an untrusted repository (http) command
buildctl --addr tcp://localhost:1234 build --frontend=dockerfile.v0 \
--local context=. --local dockerfile=. --opt platform=linux/amd64,linux/arm64 \
--output type=image,\"name=repo1/image:tag,repo2/image:tag2\",push=true,registry.insecure=true
result
[+] Building 1.3s (7/7) FINISHED
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 271B 0.0s
=> [linux/arm64 internal] load metadata for repo1/ops/alpine:3.16 0.6s
=> [linux/amd64 internal] load metadata for repo1/ops/alpine:3.16 0.7s
=> [linux/arm64 1/1] FROM build-repo1/ops/alpine:3.16@sha256:b04ffbb8cee712cc37afdc0213bf703227b9364cd2cc51fc603e96b4c5a4dfbb 0.0s
=> => resolve build-repo1/ops/alpine:3.16@sha256:b04ffbb8cee712cc37afdc0213bf703227b9364cd2cc51fc603e96b4c5a4dfbb 0.0s
=> [linux/amd64 1/1] FROM build-repo1/ops/alpine:3.16@sha256:b04ffbb8cee712cc37afdc0213bf703227b9364cd2cc51fc603e96b4c5a4dfbb 0.0s
=> => resolve build-repo1/ops/alpine:3.16@sha256:b04ffbb8cee712cc37afdc0213bf703227b9364cd2cc51fc603e96b4c5a4dfbb 0.0s
=> ERROR exporting to image 0.5s
=> => exporting layers 0.0s
=> => exporting manifest sha256:ec38a4dc05d5532d22c7d1d2037053c7cc45d21894d6d7472f31c6a962bbe80d 0.0s
=> => exporting config sha256:918d6f106ca3057e61236ce74ed3461740f9e20f43a2a4a92dd96bf07d653c4d 0.0s
=> => exporting manifest sha256:b0ae97f112af5d1babc6839f826200b5ad806abb473a97dbdf12cf53353fb617 0.0s
=> => exporting config sha256:1a1f3fa29c898fce9d87f6df9f0e29a6972d0e6385f2f16be614fb38f4badbd0 0.0s
=> => exporting manifest list sha256:ff081522cf156e635f8ac48a9883198ac1d20610876fc069f5ccf8dfb678186b 0.0s
=> => pushing layers 0.5s
------
> exporting to image:
------
error: failed to solve: unexpected status: 404 Not Found
When both repo1 and repo2 are trusted repositories, the build can be successful without setting registry.insecure.
This means that if the repository I push contains both https and http. Then there will always be a push failure, regardless of whether registry.insecure is set.
Is it possible to do a similar implementation? When registry.insecure is set, both http and https can be pushed successfully. It is possible to try first when pushing.