溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

harbor 倉庫安裝重要節(jié)點信息

發(fā)布時間:2020-08-01 18:14:24 來源:網(wǎng)絡(luò) 閱讀:1826 作者:xingzhehxiang 欄目:云計算

一、https 需要的ca證書創(chuàng)建

?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?

關(guān)注docker-compose.yml 以下選項是否對應(yīng)

[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項目沒有創(chuàng)建,用戶沒有相關(guān)項目操作權(quán)限,導(dǎo)致報沒有權(quán)限

[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?



向AI問一下細節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI