- 下载harbor:
wget https://github.com/goharbor/harbor/releases/download/v1.1.2/harbor-offline-installer-v1.1.2.tgz - 解压:
tar xvf harbor-offline-installer-v1.1.2.tgz - 配置:
vim harbor.cfg - 启动harbor:
./harbor.sh - 设置远程登录:
vim /etc/docker/daemon.json
{ "insecure-registries":["192.168.2.11"] } - 登录docker:
docker login 192.168.2.11
输入用户和密码 - 设置镜像标签:
docker tag nginx 192.168.2.11/test/nginx - 推送镜像到仓库:
docker push 192.168.2.11/test/nginx - 查询仓库:
curl http://192.168.2.11/api/search - 拉取镜像:
docker pull 192.168.2.11/test/nginx
搭建harbor镜像仓库
于 2022-01-31 00:59:09 首次发布