Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to use docker buildx pushing image to registry use http protocol?

I want to build a multi-arch image and push it to my private registry. However, I got an error

"failed to solve: rpc error: code = Unknown desc = failed to do request: Head https://10.7.121.15/v2/daocloud/multiarch-example/blobs/sha256:4c1976b440416ed5a170b2faf49c05af8f298f7afb07ff1f775b7b1ee7574042: x509: cannot validate certificate for 10.7.121.15 because it doesn't contain any IP SANs"

when I run command

"docker buildx build --platform linux/arm/v7,linux/arm64/v8,linux/amd64 --tag 10.7.121.15/daocloud/multiarch-example:latest -f multi-arch.dockerfile . --push"

so how to solve it or how to use http protocol pushing image?

like image 333
Free Avatar asked Oct 22 '25 22:10

Free


2 Answers

Try passing a config file with http: true. See this comment for more details. E.g.

[registry."10.7.121.15"]
  http = true
  insecure = true
like image 65
BMitch Avatar answered Oct 25 '25 13:10

BMitch


Try creating a builder like this:

docker buildx create --name ci-builder --driver-opt network=host --use --buildkitd-flags '--allow-insecure-entitlement security.insecure'
like image 21
Barnesy Avatar answered Oct 25 '25 15:10

Barnesy