DOCKER私有创库和代理

建立私有仓库,并启动80端口
docker run -d -p 80:5000 --name registry2-noauth --restart=always -v /usr/local/docker/registry/auth/:/auth/ -v /usr/local/docker/registry/:/var/lib/registry/ registry
更改DOCKER配置,可以使用80端口
echo '{ "insecure-registries":["172.16.1.146:5000"] }' > /etc/docker/daemon.json
或者
echo '{ "insecure-registries":["0.0.0.0/0"] }' > /etc/docker/daemon.json

cat /etc/docker/daemon.json
{ "insecure-registries":["172.16.1.146:5000"] }

systemctl daemon-reload
systemctl restart docker
内网不能上网,要使用代理上网下载的方法
新建文件,并写入以下内容,重启DOCKER服务
/etc/systemd/system/docker.service.d/http-proxy.conf
[Service]
Environment="HTTP_PROXY=http://10.239.32.111:808"
Environment="HTTPS_PROXY=http://10.239.32.111:808"