赤峰做网站开发,百度h5收费吗,做二手衣服的网站,网站修改备案号1、背景
docker 作为目前容器的标准之一#xff0c;但是对于多种架构的平台的混合编译支撑不是很好。因此衍生了镜像融合#xff0c;分别将多种不同的架构构建好#xff0c;然后将镜像进行融合上传。拉取镜像的会根据当前系统的架构拉取不同的镜像#xff0c;也可以通过 -… 1、背景
docker 作为目前容器的标准之一但是对于多种架构的平台的混合编译支撑不是很好。因此衍生了镜像融合分别将多种不同的架构构建好然后将镜像进行融合上传。拉取镜像的会根据当前系统的架构拉取不同的镜像也可以通过 --platform 指定什么类型的架构。
2、处理流程
注意这里使用的 http 类型的 harbar 服务如果不是请去除参数 --insecure
# 构建 arm 镜像
docker build -t registry.xx/public/test-arm:v1.0 -f test-arm.Dockerfile
# 构建 amd 镜像
docker build -t registry.xx/public/test-amd:v1.0 -f test-amd.Dockerfile
# 镜像融合
docker manifest create --insecure --amend registry.xx/public/test:v1.0 registry.xx/public/test-arm:v1.0 registry.xx/public/test-amd:v1.0
# 镜像上传
docker manifest push --insecure registry.xx/public/test:v1.0
3、问题
3.1 docker manifest create is only supported on a Docker cli with experimental cli features enabled
需要开启参数 experimental只有 docker v20.xx.xx 版本之前的需要后续版本默认开启该参数。
需要在两个地方加上参数
[root~]# cat /etc/docker/daemon.json
{insecure-registries : [registry.xx],experimental: true
}[root~]# cat ~/.docker/config.json
{auths: {registry.xx: {auth: xxxxxx}},experimental: enabled
}[ro
3.2 failed to configure transport: error pinging v2 registry: Get https://registry.xx/v2/: http: server gave HTTP response to HTTPS client
如果使用的是 https 的 harbor 则没有下面问题
docker 20.xx.xx 版本存在如下bug
https://github.com/docker/cli/pull/2376 请将docker 版本升级到 20.xx.xx 或者以上