(docker ps,然后docker stop id先停止所有docker服务)
查看网桥
docker network ls
删除网桥(删除已harbor开头的网桥)
docker network remove face1687e9eb
创建网桥
docker network create --driver=bridge --subnet=192.168.2.0/24 harbor
docker network create --driver=bridge --subnet=192.168.3.0/24 harbor-chartmuseum
docker network create --driver=bridge --subnet=192.168.4.0/24 harbor-clair
修改docker网段(添加bip)
cat /etc/docker/daemon.json
{
"bip":"192.168.1.1/24"
}
重启docker服务
service docker restart
修改compose配置(文件最后面,把false改为true,clair和chartmuseum也改)
networks:
harbor:
external: true
修改配置后执行命令
./prepare
./install.sh --with-clair --with-chartmuseum