dcoker搭建私有仓库

一、docker私有仓库搭建

[root@szx ~]# docker pull registry     # 拉取私有仓库镜像
[root@szx ~]# docker run -id --name=registry -p 5000:5000 registry   # 构建容器并启动
[root@szx ~]# vim /etc/docker/daemon.json       # 修改daemon.json
[root@szx ~]# systemctl restart docker        # 重启docker服务
[root@szx ~]# docker start registry          # 启动容器
[root@szx ~]# docker tag mysql:5.6 120.78.72.136:5000/mysql:5.6   # 镜像打上新标签
[root@szx ~]# docker push 120.78.72.136:5000/mysql:5.6    # 上传镜像

二、将镜像上传到私有仓库

 

 上传成功!!!!!!

三、从私有仓库拉取镜像

posted @ 2020-03-18 00:40  叫我大表哥  阅读(269)  评论(0编辑  收藏  举报