環境:18.04.1-Ubuntu
安裝docker參考鏈接https://docs.docker.com/engine/install/ubuntu/
具體如下:
更新apt & 允許使用httpssudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl gnupg lsb-relea添加gpk key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg設置穩定的安裝源 (arm芯片機器執行自行參考鏈接原文)
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_relea -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null安裝docker
sudo apt-get updatesudo apt-get install docker-ce docker-ce-cli containerd.io使用https證書
離線環境不裝這個也行
下載acme配置郵箱 郵箱請替換成實際的wget -O - https://get.acme.sh | sh -s email=xxx@xxx.com
安裝成功如下
--2021-03-19 08:05:43-- https://get.acme.sh/Resolving get.acme.sh (get.acme.sh)... 104.21.34.62, 172.67.199.16, 2606:4700:3031::ac43:c710, ...Connecting to get.acme.sh (get.acme.sh)|104.21.34.62|:443... connected.HTTP request nt, awaiting respon... 200 OKLength: unspecified [text/html]Saving to: ‘STDOUT’- [ <=> ] 937 --.-KB/s in 0s 2021-03-19 08:05:44 (25.8 MB/s) - written to stdout [937] % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed100 204k 100 204k 0 0 4650k 0 --:--:-- --:--:-- --:--:-- 4650k[Fri Mar 19 08:05:44 UTC 2021] Installing from online archive.[Fri Mar 19 08:05:44 UTC 2021] Downloading https://github.com/acmesh-official/acme.sh/archive/master.tar.gz[Fri Mar 19 08:05:45 UTC 2021] Extracting master.tar.gz[Fri Mar 19 08:05:45 UTC 2021] It is recommended to install socat first.[Fri Mar 19 08:05:45 UTC 2021] We u socat for standalone rver if you u standalone mode.[Fri Mar 19 08:05:45 UTC 2021] If you don't u standalone mode, just ignore this warning.[Fri Mar 19 08:05:45 UTC 2021] Installing to /root/.acme.sh[Fri Mar 19 08:05:45 UTC 2021] Installed to /root/.acme.sh/acme.sh[Fri Mar 19 08:05:45 UTC 2021] Installing alias to '/root/.bashrc'[Fri Mar 19 08:05:45 UTC 2021] OK, Clo and reopen your terminal to start using acme.sh[Fri Mar 19 08:05:45 UTC 2021] Installing cron jobno crontab for rootno crontab for root[Fri Mar 19 08:05:45 UTC 2021] Good, bash is found, so change the shebang to u bash as preferred.[Fri Mar 19 08:05:45 UTC 2021] OK[Fri Mar 19 08:05:45 UTC 2021] Install success!生成證書
export Ali_Key="LTAI4FmiHYjQAr32GkmkjAfH" && export Ali_Secret="bk7IXxKVHcoVsmf4mP8N85ANkNgsMi" ;acme.sh --issue --dns dns_ali -d "*.test.com"
結果有下面的
-----END CERTIFICATE-----[Fri Mar 19 08:08:26 UTC 2021] Your cert is in /root/.acme.sh/*.test.com/*. .com.cer [Fri Mar 19 08:08:26 UTC 2021] Your cert key is in /root/.acme.sh/*.test.com/*.test.com.key [Fri Mar 19 08:08:26 UTC 2021] The intermediate CA cert is in /root/.acme.sh/*.test.com/ca.cer [Fri Mar 19 08:08:26 UTC 2021] And the full chain certs is there: /root/.acme.sh/*.test.com/fullchain.cer
注意 key 用 這個 /root/.acme.sh/*.test.com/*.test.com.key
CA 用 /root/.acme.sh/*.test.com/fullchain.cer 用第一個會有問題
安裝harborgithub拿最新的tar包 解壓到服務器https://github.com/goharbor/harbor/releas
安裝docker compohttps://github.com/docker/compo/releas
去上面的地址下載一個 docker-compo-Linux-x86_64
cp docker-compo-Linux-x86_64 /usr/local/bin/docker-compochmod +x /usr/local/bin/docker-compo在線安裝harbor
https://github.com/goharbor/harbor/releas
解壓harbor-online-installer-v2.2.1.tgz
修改解壓后的配置文件 harbor.yml.tmpl
修改hostname和證書位置 如果不需要https 可以不配
# The IP address or hostname to access admin UI and registry rvice.# DO NOT u localhost or 127.0.0.1, becau Harbor needs to be accesd by external clients.hostname: reg.mydomain.com
# https related confighttps: # https port for harbor, default is 443 port: 443 # The path of cert and key files for nginx certificate: /your/certificate/path private_key: /your/private/key/path
修改密碼的配置 默認是admin Harbor12345
# Remember Change the admin password from UI after launching Harbor.harbor_admin_password: Harbor12345
把文件改名
mvharbor.yml.tmplharbor.yml下面一鍵安裝
root@test-harbor:/harbor# ./install.sh [Step 0]: checking if docker is installed ...Note: docker version: 20.10.5[Step 1]: checking docker-compo is installed ...Note: docker-compo version: 1.28.5[Step 2]: preparing environment ...[Step 3]: preparing harbor configs ...prepare ba dir is t to /harborno config file: /harbor/harbor.ymlroot@test-harbor:/harbor# cp harbor.yml.tmpl harbor.ymlroot@test-harbor:/harbor# Digest: sha256:5721c120d6e44e1bdc3b9c0d56af57848430cabe5bbca415ff9f353c2f53024aStatus: Downloaded newer image for goharbor/nginx-photon:v2.1.4Creating harbor-log ... doneCreating harbor-portal ... doneCreating harbor-db ... doneCreating registryctl ... doneCreating redis ... doneCreating registry ... doneCreating harbor-core ... doneCreating harbor-jobrvice ... doneCreating nginx ... done? ----Harbor has been installed and started successfully.----root@test-harbor:/harbor#
下面就可以登錄harbor 新建項目了 比如新建config項目
其他操作
后臺登錄harbor鏡像庫
docker login -u admin -p Harbor12345 azure.test.com
push鏡像
docker push azure.test.com/config/relea:21.02.R1
可以在下面看到了
本文發布于:2023-02-28 21:03:00,感謝您對本站的認可!
本文鏈接:http://www.newhan.cn/zhishi/a/1677719996101570.html
版權聲明:本站內容均來自互聯網,僅供演示用,請勿用于商業和其他非法用途。如果侵犯了您的權益請與我們聯系,我們將在24小時內刪除。
本文word下載地址:gpk文件怎么安裝(gpk是什么安裝包).doc
本文 PDF 下載地址:gpk文件怎么安裝(gpk是什么安裝包).pdf
| 留言與評論(共有 0 條評論) |