2018-08-30 14:27:40.0|分类: docker+node.js+zookeeper构建微服务|浏览量: 1240
创建文件夹registry mkdir registry 启动Docker Registry docker run -d -p 50000:5000 --restart=always --name registry -v /home/docker/registry:/var/lib/registry registry:2 -d表示后台启动docker -p映射端口号 -v 设置数据卷 --restart=always If you want to use the registry as part of your permanent infrastructure, you should set it to restart automatically when Docker restarts or if it exits. This example uses the 查看当前镜像列表,然后改变测试镜像的tag docker tag ea914067e5f 127.0.0.1:50000/conca/ubuntu-java8 查看镜像列表docker images 提交镜像 docker push 127.0.0.1:50000/conca/ubuntu-java8 然后删除本地缓存中的镜像127.0.0.1:50000/conca/ubuntu-java8、conca/ubuntu-java8 $ docker image remove 127.0.0.1:50000/conca/ubuntu-java8 $ docker image remove conca/ubuntu-java8 下载本地registry的镜像 docker pull 127.0.0.1:50000/conca/ubuntu-java8 查看关联的数据卷/home/docker/registry 停止本地registry $ docker container stop registry 删除本地registry docker container stop registry && docker container rm -v registry |