harbor https证书访问

客户端需要创建证书文件存放的位置,并且把服务端创建的证书拷贝到该目录下,然后重启客户端docker。

我们这里创建目录为

mkdir -p /etc/docker/certs.d/harbor.xxx.com

把服务端crt证书文件拷贝到客户端,例如我这的客户端为:172.16.244.171

scp /etc/certs/ca.crt [email protected]:/etc/docker/certs.d/harbor.xxx.com/

重启客户端docker

systemctl restart docker

测试https访问

docker login harbor.xxx.com
Username (admin): 
Password: 
Login Succeeded

push镜像

[root@master01 server]# docker push harbor.xxx.com/xxx/officialweb
The push refers to repository [harbor.xxx.com/xxx/officialweb]
60317dbbcd5d: Pushing [=========>                                         ]  4.719MB/24.95MB
35c20f26d188: Pushed 
c3fe59dd9556: Pushing [=>                                                 ]  10.81MB/351.5MB
6ed1a81ba5b6: Pushed 
a3483ce177ce: Pushed 
ce6c8756685b: Pushed 
30339f20ced0: Pushing [===>                                               ]  8.244MB/122.6MB
0eb22bfb707d: Pushing [=====>                                             ]  4.604MB/44.31MB
a2ae92ffcd29: Pushing [===>                                               ]   8.59MB/123MB

 

你可能感兴趣的:(运维)