您好,登錄后才能下訂單哦!
本篇內容介紹了“如何安裝harbor作為docker鏡像倉庫”的有關知識,在實際案例的操作過程中,不少人都會遇到這樣的困境,接下來就讓小編帶領大家學習一下如何處理這些情況吧!希望大家仔細閱讀,能夠學有所成!
[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 # 開啟遠程連接 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是一個開源的可信云本地注冊項目,用于存儲、簽名和掃描內容。Harbor通過添加用戶通常需要的功能(如安全性、身份和管理)擴展了開源Docker發行版。使注冊表更接近構建和運行環境可以提高圖像傳輸效率。
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 ##對應服務器IP port: 80 ##對應harbor應用端口 # port: 443 ##屏蔽https # certificate: /your/certificate/path ##屏蔽https # private_key: /your/private/key/path ##屏蔽https harbor_admin_password: llsydn123 ##harbor登錄密碼,根據情況修改
Harbor的默認安裝使用HTTP—因此,您需要將選項“-unsecure registry”添加到客戶端的Docker守護進程,并重新啟動Docker服務。
vi /etc/docker/daemon.json {"insecure-registries" : [ "192.168.4.xxx" ] }
重啟docker
service docker restart
./install.sh
“如何安裝harbor作為docker鏡像倉庫”的內容就介紹到這里了,感謝大家的閱讀。如果想了解更多行業相關的知識可以關注億速云網站,小編將為大家輸出更多高質量的實用文章!
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。