7-Docker私有仓库harbor私有镜像上传配置

1.编辑/etc/docker/daemon.json文件,修改容器仓库配置,并保存

命令:

vim /etc/docker/daemon.json

更新前

{
  "registry-mirrors": ["https://ykjpg821.mirror.aliyuncs.com"]
}

更新后

{
  "registry-mirrors": ["https://ykjpg821.mirror.aliyuncs.com"],
  "insecure-registries": ["172.20.10.12:8080"]
}

2.重启docker及Harbor

命令:

cd /usr/local/harbor

docker-compose -f docker-compose.yml down -v

docker-compose ps -a

systemctl stop docker

systemctl status docker

systemctl start docker

systemctl status docker

docker-compose -f docker-compose.yml up -d

docker-compose ps -a

[root@centos79 docker]# cd /usr/local/harbor
[root@centos79 harbor]# docker-compose -f docker-compose.yml down -v
[+] Running 10/9
 ✔ Container nginx              Removed                    

你可能感兴趣的:(docker,docker,容器,运维)