安裝harbor作為docker鏡像倉庫的問題
安裝包
docker-20.10.9.tgz
docker-compose
百度網(wǎng)盤下載以上兩個包
鏈接: https://pan.baidu.com/s/1Xy6vkkxUGLmSDwrVk8ej-A 提取碼: gc8r
docker.service 如下:
[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
一、docker和docker-compose離線部署
1、上傳docker-20.10.9.tgz安裝包并解壓
tar -zxvf docker-20.10.9.tgz cp docker/* /usr/bin/
2、docker.service文件
mv docker.service /usr/lib/systemd/system/
3、啟動Docker
systemctl daemon-reload systemctl enable docker systemctl start docker systemctl status docker
4、docker-compose部署
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
5、測試docker-compose
docker-compose -v
二、安裝harbor作為本地的倉庫
Harbor是一個開源的可信云本地注冊項目,用于存儲、簽名和掃描內(nèi)容。Harbor通過添加用戶通常需要的功能(如安全性、身份和管理)擴展了開源Docker發(fā)行版。使注冊表更接近構建和運行環(huán)境可以提高圖像傳輸效率。
1、解壓harbor-offline-installer-v2.3.0.tgz
tar xvf harbor-offline-installer-v1.9.3.tgz
2、進入harbor目錄,修改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登錄密碼,根據(jù)情況修改
3、配置docker client,編輯/etc/docker/daemon.json
Harbor的默認安裝使用HTTP—因此,您需要將選項“-unsecure registry”添加到客戶端的Docker守護進程,并重新啟動Docker服務。
vi /etc/docker/daemon.json {"insecure-registries" : [ "192.168.4.xxx" ] }
- 重啟docker
service docker restart
4、安裝 Harbor
./install.sh
5、訪問harbor
http://<your_harbor_host_ip
默認用戶名和密碼:admin/llsydn123
好了,以上就是我個人的實操了。
到此這篇關于聊聊安裝harbor作為docker鏡像倉庫的問題的文章就介紹到這了,更多相關docker鏡像倉庫harbor內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關文章希望大家以后多多支持腳本之家!
相關文章
zabbix監(jiān)控docker容器狀態(tài)【推薦】
這篇文章主要介紹了zabbix監(jiān)控docker容器狀態(tài)的相關資料,非常不錯,具有一定的參考借鑒價值,需要的朋友可以參考下2018-06-06Docker部署nginx+php環(huán)境的全過程(簡單可用!)
最近在學docker,順便配置了一下docker中的nginx與php,發(fā)現(xiàn)網(wǎng)上的關于docker中配置nginx與php的資料很少,而且有的也很舊,沒有太多的參考性,下面這篇文章主要給大家介紹了關于Docker部署nginx+php環(huán)境的相關資料,需要的朋友可以參考下2023-02-02關于Docker網(wǎng)絡配置及部署SpringCloud項目詳解
這篇文章主要介紹了關于Docker網(wǎng)絡配置及部署SpringCloud項目詳解,Docker在創(chuàng)建容器時有四種網(wǎng)絡模式,bridge為默認不需要去指定,其他三種模式需要在創(chuàng)建容器時使用–net去指定,需要的朋友可以參考下2023-07-07