Reputation: 163
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?
Upvotes: 4
Views: 9608
Reputation: 1261
The @BMitch answer have solved the issue, but I want to add more details on how to achieve this.
You need to build builder image with the mentioned config. So after creating the config (e.g. buildkitd.toml
):
[registry."10.7.121.15"]
http = true
insecure = true
you should run the following commands:
docker buildx rm mybuilder
docker buildx create --name mybuilder --config ./buildkitd.toml --use
docker buildx inspect --bootstrap
docker buildx build ...
You can omit the first line if you don't need to clean up previously created builder.
Upvotes: 2
Reputation: 273
Try creating a builder like this:
docker buildx create --name ci-builder --driver-opt network=host --use --buildkitd-flags '--allow-insecure-entitlement security.insecure'
Upvotes: 2
Reputation: 263637
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
Upvotes: 5