您好,登錄后才能下訂單哦!
本篇內(nèi)容介紹了“如何安裝harbor作為docker鏡像倉庫”的有關(guān)知識,在實(shí)際案例的操作過程中,不少人都會遇到這樣的困境,接下來就讓小編帶領(lǐng)大家學(xué)習(xí)一下如何處理這些情況吧!希望大家仔細(xì)閱讀,能夠?qū)W有所成!
[Unit] Description=Docker Application Container Engine Documentation=https://docs.docker.com After=network-online.target firewalld.service Wants=network-online.target [Service] Type=notify # the default is not to use systemd for cgroups because the delegate issues still # exists and systemd currently does not support the cgroup feature set required # for containers run by docker # 開啟遠(yuǎn)程連接 ExecStart=/usr/bin/dockerd -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock ExecReload=/bin/kill -s HUP $MAINPID # Having non-zero Limit*s causes performance problems due to accounting overhead # in the kernel. We recommend using cgroups to do container-local accounting. LimitNOFILE=infinity LimitNPROC=infinity LimitCORE=infinity # Uncomment TasksMax if your systemd version supports it. # Only systemd 226 and above support this version. #TasksMax=infinity TimeoutStartSec=0 # set delegate yes so that systemd does not reset the cgroups of docker containers Delegate=yes # kill only the docker process, not all processes in the cgroup KillMode=process # restart the docker process if it exits prematurely Restart=on-failure StartLimitBurst=3 StartLimitInterval=60s [Install] WantedBy=multi-user.target
tar -zxvf docker-20.10.9.tgz cp docker/* /usr/bin/
mv docker.service /usr/lib/systemd/system/
systemctl daemon-reload systemctl enable docker systemctl start docker systemctl status docker
cp -r docker-compose /usr/local/bin/ cp -r docker-compose /usr/local/sbin/ chmod a+x /usr/local/bin/docker-compose chmod a+x /usr/local/sbin/docker-compose
docker-compose -v
Harbor是一個開源的可信云本地注冊項目,用于存儲、簽名和掃描內(nèi)容。Harbor通過添加用戶通常需要的功能(如安全性、身份和管理)擴(kuò)展了開源Docker發(fā)行版。使注冊表更接近構(gòu)建和運(yùn)行環(huán)境可以提高圖像傳輸效率。
tar xvf harbor-offline-installer-v1.9.3.tgz
harbor.yml
cp -r harbor.yml.tmpl harbor.yml vi harbor.yml
hostname: 192.168.4.xxx ##對應(yīng)服務(wù)器IP port: 80 ##對應(yīng)harbor應(yīng)用端口 # port: 443 ##屏蔽https # certificate: /your/certificate/path ##屏蔽https # private_key: /your/private/key/path ##屏蔽https harbor_admin_password: llsydn123 ##harbor登錄密碼,根據(jù)情況修改
Harbor的默認(rèn)安裝使用HTTP—因此,您需要將選項“-unsecure registry”添加到客戶端的Docker守護(hù)進(jìn)程,并重新啟動Docker服務(wù)。
vi /etc/docker/daemon.json {"insecure-registries" : [ "192.168.4.xxx" ] }
重啟docker
service docker restart
./install.sh
“如何安裝harbor作為docker鏡像倉庫”的內(nèi)容就介紹到這里了,感謝大家的閱讀。如果想了解更多行業(yè)相關(guān)的知識可以關(guān)注億速云網(wǎng)站,小編將為大家輸出更多高質(zhì)量的實(shí)用文章!
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報,并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。