harbor搭建企业docker私有镜像仓库
搭建harbor仓库
安装docker和docker-compose
# curl -fsSL https://get.docker.com/ | sh
# systemctl start docker
# systemctl enable docker
# curl -L https://github.com/docker/compose/releases/download/1.19.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
# chmod +x /usr/local/bin/docker-compose下载harbor安装包
# wget https://github.com/goharbor/harbor/releases/download/v2.0.0/harbor-offline-installer-v2.0.0.tgz
# tar -zxvf harbor-offline-installer-v2.0.0.tgz
# mv harbor /opt/
# cd /opt/harbor
# cp harbor.yml.tmpl harbor.yml配置https方式访问证书
$ mkdir -p /etc/docker/certs.d/reg.niewx.club && cd /etc/docker/certs.d/reg.niewx.club$ openssl genrsa -out ca.key 2048$ openssl req -x509 -new -nodes -key ca.key -days 10000 -out ca.crt -subj "/CN=Harbor-ca"$ openssl req -newkey rsa:4096 -nodes -sha256 -keyout server.key -out server.csrecho subjectAltName = IP:49.235.179.157 > extfile.cnf openssl x509 -req -in server.csr -CA ca.crt -CAkey ca.key -CAcreateserial -days 365 -extfile extfile.cnf -out server.crt[root@VM_0_13_centos reg.niewx.club]# ls ca.crt ca.key ca.srl extfile.cnf server.crt server.csr server.key
修改harbor配置项
启动harbor

haobor仓库的使用
harbor的登录和创建项目




客户端推送镜像
harbor中角色权限说明
最后更新于