如何构建共享标签的多架构docker镜像

1
docker login
1
vim ~/.docker/config.json
1
"experimental": "enabled"
1
docker manifest create is only supported on a Docker cli with experimental cli features enabled
1
docker build -t newnius/rsync:arm64 .
1
2
3
4
5
6
7
$ docker manifest create newnius/rsync:latest newnius/rsync:arm64 newnius/rsync:amd64
Created manifest list docker.io/newnius/rsync:latest

$ docker manifest annotate newnius/rsync:latest newnius/rsync:arm64 --os linux --arch arm64

docker manifest push newnius/rsync:latest
sha256:bd0af18dae521dbf48bbf980e9cb5872d5f95ff8164ebc9639d1f096f4ae51db
1
rm -rf ~/.docker/manifests