您好,登錄后才能下訂單哦!
一、https 需要的ca證書創建
?1056? mkdir -p /data/cert && cd /data/cert
?1057? openssl genrsa -out ca.key 2048
?1058? openssl req -x509 -new -nodes -key ca.key -days 10000 -out ca.crt -subj "/CN=Harbor-ca"
?1059? ll
?1060? openssl req -newkey rsa:4096 -nodes -sha256 -keyout server.key -out server.csr
?1061? ll
?1062? echo subjectAltName = IP:192.168.0.169 > extfile.cnf
?1063? cat extfile.cnf?
?1064? openssl x509 -req -in server.csr -CA ca.crt -CAkey ca.key -CAcreateserial -days 365 -extfile extfile.cnf -out server.crt
?
二、x509: certificate signed by unknown authority 登錄時候報錯
[root@169_test harbor]# cat /etc/docker/daemon.json?
{?
? "insecure-registries": ["192.168.0.169"]
}
[root@169_test harbor]#?
三、harbor.yml配置項目
[root@169_test harbor]# cat harbor.yml? |grep -v "#"
hostname: 192.168.0.169
https:
? port: 443
? certificate: /data/cert/server.crt
? private_key: /data/cert/server.key
四、goharbor/nginx-photon:v1.8.0 啟動失敗
Error response from daemon: configured logging driver does not support reading?
關注docker-compose.yml 以下選項是否對應
[root@169_test harbor]# cat docker-compose.yml? |grep cert
? ? ? ? source: /data/cert/server.key
? ? ? ? target: /etc/cert/server.key
? ? ? ? source: /data/cert/server.crt
? ? ? ? target: /etc/cert/server.crt
[root@169_test harbor]#?
五、mytest項目沒有創建,用戶沒有相關項目操作權限,導致報沒有權限
[root@169_test ~]# docker login 192.168.0.169
Authenticating with existing credentials...
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store
Login Succeeded
[root@169_test ~]#? docker push 192.168.0.169/mytest/mariadb10.3?
The push refers to repository [192.168.0.169/mytest/mariadb10.3]
9fe1346a8e46: Preparing?
44b71d929e12: Preparing?
23402936133c: Preparing?
d4149884a4c1: Preparing?
c80bf439605a: Preparing?
21e1e894139d: Waiting?
d69483a6face: Waiting?
denied: requested access to the resource is denied
備注:
軟件版本:harbor.v1.8.0.tar.gz
備注
上傳命令:
? 登錄? docker login 192.168.0.169
?查看鏡像? docker images
給鏡像打標簽 docker tag mytest/mariadb10.3:latest 192.168.0.169/mytest/mariadb10.3:latest
查看鏡像信息? docker images
上傳鏡像,注意要有mytest項目? ?docker push 192.168.0.169/mytest/mariadb10.3?
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。