温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

Docker私有仓库

发布时间:2020-02-26 15:00:18 来源:网络 阅读:308 作者:知止内明 栏目:建站服务器

拉取私有仓库镜像

执行命令:docker pull registry
如果提示:

error pulling image configuration: Get https://dseasb33srnrn.cloudfront.net/
解决方法:

systemctl stop docker
echo "DOCKER_OPTS=\"\$DOCKER_OPTS --registry-mirror=http://f2d6cb40.m.daocloud.io\"" | sudo tee -a /etc/default/docker
 service docker restart

Docker私有仓库

再次执行:docker pull registry

启动私有仓库容器

docker run -di --name=registry -p 5000:5000 registry

验证是否成功:

浏览器查看:
http://192.168.128.128:5000/v2/_catalog
Docker私有仓库
看到{"repositories":[]} 表示私有仓库搭建成功并且内容为空

修改daemon.json

vim /etc/docker/daemon.json
添加以下内容,保存退出

{"insecure-registries":["192.168.128.128:5000"]}

用于让 docker信任私有仓库地址

重启docker 服务

systemctl restart docker
向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI