书接上一文,在这简单配置一下ip+端口
以下操作在windows和linux下通用
拉取测试镜像给镜像打tagdocker pull hello-world
docker tag hello-world:latest 10.0.19.192:5000/hello-world:latest
把10.0.19.192换成自建仓库的ip
推送镜像docker push 127.0.0.1:5000/hello-world:latest
如果推送失败,请检查是否已经配置了远程地址。
windows参考第一张图
linux用户修改配置文件:
vim /etc/docker/daemon.json
{
"registry-mirrors": [
"http://hub-mirror.c.163.com",
"https://docker.mirrors.ustc.edu.cn",
"https://registry.docker-cn.com"
],
"insecure-registries": [
"10.0.19.192:5000"
]
}
记得把10.0.19.192换成自建仓库的内网ip
拉取镜像# 格式如下: docker pull 127.0.0.1:5000/镜像名称:镜像版本号 # 以hello-world为例: docker pull 127.0.0.1:5000/hello-world



