安裝harbor作為docker映象倉庫
theme: cyanosis
持續創作,加速成長!這是我參與「掘金日新計劃 · 6 月更文挑戰」的第20天,點選檢視活動詳情
安裝包
docker-20.10.9.tgz(可點選下載)、
docker-compose(可點選下載)、
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是一個開源的可信雲本地註冊專案,用於儲存、簽名和掃描內容。Harbor通過新增使用者通常需要的功能(如安全性、身份和管理)擴充套件了開源Docker發行版。使登錄檔更接近構建和執行環境可以提高影象傳輸效率。
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登入密碼,根據情況修改
```
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
好了,以上就是我個人的實操了。
個人理解,可能也不夠全面,班門弄斧了。
好了,今天就先到這裡了!!!^_^
如果覺得有收穫的,幫忙點贊、評論、收藏
一下唄!!!
- JVM調優-常見的調優工具
- JVM調優-JVM調優實踐一
- nacos許可權繞過漏洞
- JVM調優-常見的垃圾回收器
- JVM調優-GC基本原理和調優關鍵分析
- 非一線城市,畢業快5年,沒車沒孩程式設計師 | 2022年中總結
- 使用jmeter壓測,生成dump記憶體快照,並用jvisualvm分析
- Skywalking分散式鏈路追蹤,無法記錄日誌分析(gateway閘道器)
- nacos的一些api和監聽器用法
- 一次線上ngix的504 gateway timeout排查(真實案例)
- rtsp通過ffmpeg nginx釋出成rtmp和http-flv部署文件
- http伺服器負載均衡安裝部署(apache keepalived)(一)
- 網路穿透,實現本地開發環境測試微信公眾號(2)
- 利用別人的映象製作屬於自己的Docker映象包(nginx,mysql,redis等)
- 處理專案掃描出來的一些常見漏洞bug(java相關)
- Docker打包製作openoffice映象(Dockerfile方式),並處理中文亂碼
- Docker打包製作rocketmq映象(Dockerfile方式),並執行啟動
- 安裝harbor作為docker映象倉庫
- Docker打包製作seata映象(Dockerfile方式),並執行啟動
- Docker映象jdk製作打包(各tag版本說明)