官网给出的solution:
https://github.com/docker/migrator/blob/master/Dockerfile
基本思路是:
利用Docker 1.6之后的版本可以和两个Registry进行通信, 从一个registry pull再push到另一个Registry
问题这个工具有很多缺陷。首先他是一个单一的shell脚本,只能做离线同步
参考:http://dockone.io/article/747
运行migrator镜像
docker run -it \ -v /var/run/docker.sock:/var/run/docker.sock \ -e V1_REGISTRY=v1.registry.fqdn \ -e V2_REGISTRY=v2.registry.fqdn \ docker/migrator
测试环境registry v1
docker run -d -p 5002:5000 --restart=always --name registry-v1 {repository}/system/docker-registry:1.3
测试环境migrator
docker run -it \
-v /var/run/docker.sock:/var/run/docker.sock \
-e V1_REGISTRY=127.0.0.1:5002 \
-e V2_REGISTRY=127.0.0.1:5000 \
docker/migrator
测试环境registry v2