随笔 - 41  文章 - 0 评论 - 4 阅读 - 63353
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

参考:https://github.com/docker/buildx/issues/163

https://github.com/thegeeklab/drone-docker-buildx/issues/153

https://github.com/moby/buildkit/blob/master/docs/buildkitd.toml.md

 

准备用 buildx 构建多平台镜像,基于Dockerfile

from 私服中的 jdk

在 执行以下命令时,报 http: server gave HTTP response to HTTPS client

docker buildx build --platform=linux/arm,linux/arm64,linux/amd64 -t "192.168.31.111:5000/test:1.0.0" --push .

 

解决办法:

1. 进入 buildx 容器

 2. 编辑 buildkitd.toml

vi /etc/buildkit/buildkitd.toml

在 

前面加上 私服地址、http = true、insecure = true

[registry."192.168.31.111:5000"]
  mirrors = ["192.168.31.111:5000"]
  http = true
  insecure = true

 

解决灵感来自于:https://github.com/thegeeklab/drone-docker-buildx/issues/153

posted on   文泽9527  阅读(773)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
· 单元测试从入门到精通
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 上周热点回顾(3.3-3.9)
点击右上角即可分享
微信分享提示