💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
Harbor是一个开源的镜像管理仓库工具 安装此组件之前请确保 **Docker** 和 **Docker-Compose** 已经安装完成 --- ### 互联网 ``` wget --no-check-certificate https://github.com/goharbor/harbor/releases/download/v2.1.1/harbor-offline-installer-v2.1.1.tgz ``` --- ### 局域网 ``` rz ``` 在弹出框中选择对应的包并上传 --- ### CentOS 7 - 修改配置 ``` tar -zxvf <file> mv harbor /usr/local/harbor - 修改配置 cd /usr/local/harbor mv harbor.yml.tmpl harbor.yml vi harbor.yml - 修改 hostname 为主机IP - 修改端口 - 注释 https docker network create --driver bridge --subnet=5.5.5.0/16 --gateway=5.5.5.1 harbor docker load -i harbor.v2.1.1.tar.gz ./prepare vi docker-compose.yml ``` - 将网络设置为添加的 ![](https://img-blog.csdnimg.cn/b0cad50f6c5a4afab030ab0c1c5db6f5.png) - 最后将网络改为 default ![](https://img-blog.csdnimg.cn/0a3aaa5ac5e34e3699f62231a0c591e8.png) - 初始化并安装 ``` ./install.sh cd /usr/local/harbor docker-compose ps docker-compose down - 内部环境需要放开HTTPS,不然登录和拉取镜像会报证数错误 vi /etc/docker/daemon.json { "registry-mirrors": ["http://<ip>:<port>"], "insecure-registries": ["<ip>:<port>"] } systemctl restart docker - 启动和登录 docker-compose up -d docker login http://<ip>:<port> ``` --- ### 删除镜像的几种方式 ``` docker rmi -f `docker images -q` docker rm -f `docker ps -aq` docker images | grep data-desen-facade | awk '{print $3}' docker rmi -f `docker images | awk '{print $3}'` ``` --- ### 附加操作 如果是阿里云的ECS需要修改默认网段 ``` docker network inspect harbor_harbor docker network disconnect -f harbor_harbor harbor-portal docker network disconnect -f harbor_harbor harbor-db docker network disconnect -f harbor_harbor redis docker network disconnect -f harbor_harbor harbor-log docker network disconnect -f harbor_harbor registryctl docker network remove harbor_harbor ``` --- ### 参考文档 * [修改网桥一](https://blog.csdn.net/weixin_43046724/article/details/103124689) * [修改网桥二](https://blog.csdn.net/qq_26531719/article/details/105865827)