一、Docker私服配置
环境:centos7 + docker + harbor
1. vim /etc/docker/daemon.json
{\"insecure-registries\":[\"10.16.211.22:5000\",\"10.16.211.22\"]}
2. vim /etc/containers/registries.conf
[registries.search]
registries = [\'docker.io\',\'registry.centos.org\',\'registry.access.redhat.com\',\'10.16.211.22:5000\',\'10.16.211.22\']
# If you need to access insecure registries, add the registry\'s fully-qualified name.
# An insecure registry is one that does not have a valid SSL certificate or only does HTTP.
[registries.insecure]
registries = [\'10.16.211.22:5000\',\'10.16.211.22\']
# If you need to block pull access from a registry, uncomment the section below
# and add the registries fully-qualified name.
# Docker only
[registries.block]
registries = []
修改位置,红色IP为自己搭建的docker仓库私服地址或域名
[registries.search]
registries = [\'docker.io\',\'registry.centos.org\',\'registry.access.redhat.com\',\'10.16.211.22:5000\',\'10.16.211.22\']
[registries.insecure]
registries = [\'10.16.211.22:5000\',\'10.16.211.22\']
3. 重启docker服务
systemctl daemon-reload
systemctl restart docker.service
二、客户端配置:
Macos(其他操作系统需要找到安装docker服务创建的daemon.json配置文件):
vim ~/.docker/daemon.json
{\"insecure-registries\":[\"10.16.211.22:5000\",\"10.16.211.22\"]}
重启docker服务
继续阅读与本文标签相同的文章
上一篇 :
Java基础—泛型
下一篇 :
解决校园弊端?加大校园网络数据化
-
科技产品没有时尚力?搜狗AI录音笔,要科技更要时尚
2026-05-19栏目: 教程
-
安!排!微信聊天记录的最佳恢复方法,拿走不谢!
2026-05-19栏目: 教程
-
一线丨滴滴与清华成立未来出行联合研究中心
2026-05-19栏目: 教程
-
如何监管数字健康和人工智能产品?FDA新发布两份指南予以明确
2026-05-19栏目: 教程
-
Linux系统权限管理
2026-05-19栏目: 教程
