目錄
前言
一、本地私有倉庫
1、拉取倉庫鏡像
2、在 daemon.json 檔案中添加私有鏡像倉庫地址
3、運行 registry 容器
4、 Docker 容器的重啟策略如下
5、為鏡像打標簽
6、上傳到私有倉庫
7、列出私有倉庫的所有鏡像
8、列出私有倉庫的 centos 鏡像有哪些 tag
9、洗掉原有 centos 鏡像,測驗私有倉庫下載
二、Harbor
1、harbor介紹
2、Harbor功能介紹
3、Harbor組成
4、Harbor的誤區
三、Harbor 部署
1、下載harbor安裝包
2、配置harbor
2.1 解壓harbor
2.2 編輯組態檔
2.3 運行安裝腳本
2.4 驗證安裝鏡像
2.5 查看本地埠
3、web訪問harbor管理界面
四、配置Harbor開機啟動
1、配置harbor.service檔案
2、Harbor開機啟動
五、配置docker使用harbor倉庫
1、配置docker
1.1 配置daemon.json
1.2 重啟docker
1.3 命令列登錄harbor
2、創建harbor專案
3、測驗上傳鏡像
4、harbor界面驗證鏡像
5、驗證鏡像資訊
6、測驗下載鏡像
6.1 洗掉存在的鏡像
6.2 拉取鏡像
6.3 從鏡像啟動容器并驗證
6.4 驗證埠
總結
前言
在 Docker 中,當我們執行 docker pull xxx 的時候 ,它實際上是從 registry.hub.docker.com 這個地址去查找,這就是Docker公司為我們提供的公共倉庫,在作業中,我們不可能把企業專案push到公有倉庫進行管理,所以為了更好的管理鏡像,Docker不僅提供了一個中央倉庫,同時也允許我們搭建本地私有倉庫,這一篇介紹registry、harbor兩種私有倉庫搭建,
一、本地私有倉庫
1、拉取倉庫鏡像
[root@c7-1 ~]#docker pull registry
......
[root@c7-1 ~]#docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
nginx latest ea335eea17ab 2 weeks ago 141MB
registry latest b8604a3fe854 2 weeks ago 26.2MB
centos 7 eeb6ee3f44bd 2 months ago 204MB
2、在 daemon.json 檔案中添加私有鏡像倉庫地址
[root@c7-1 ~]#cat /etc/docker/daemon.json
{
"insecure-registries": ["192.168.10.20:5000"],
"registry-mirrors": ["https://4iv7219l.mirror.aliyuncs.com"]
}
[root@c7-1 ~]#systemctl restart docker.service
3、運行 registry 容器
[root@c7-1 ~]#docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
nginx latest ea335eea17ab 2 weeks ago 141MB
registry latest b8604a3fe854 2 weeks ago 26.2MB
centos 7 eeb6ee3f44bd 2 months ago 204MB
[root@c7-1 ~]#docker run -itd -v /data/registry:/var/lib/registry -p 5000:5000 --restart=always --name registry registry:latest
465355484f317cf31c4df4d2d90edf078bc6063cca7bd175b80c3abdb83a03ca
[root@c7-1 ~]#docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
465355484f31 registry:latest "/entrypoint.sh /etc…" 9 seconds ago Up 8 seconds 0.0.0.0:5000->5000/tcp, :::5000->5000/tcp registry
[root@c7-1 ~]#docker exec -it 465355484f31 /bin/sh
/ # ls
bin etc media proc sbin tmp
dev home mnt root srv usr
entrypoint.sh lib opt run sys var
-itd --- 在容器中打開一個偽終端進行互動操作,并在后臺運行
-v --- 把宿主機的 /data/registry 目錄掛載到容器內(這個目錄是 registry 容器中存放鏡像檔案的目錄),來實作資料的持久化
-p --- 映射埠,訪問宿主機的 5000 埠就訪問到 registry 容器的服務了
--restart=always --- 這是重啟的策略,在容器退出時總是重啟容器
--name registry --- 創建容器命名為 registry
registry:latest --- 這個是剛才 pull 下來的鏡像
4、 Docker 容器的重啟策略如下
no --- 默認策略,在容器退出時不重啟容器,
no-failure --- 在容器非正常退出時(退出狀態非0),才會重啟容器,
no-failure:3 --- 在容器非正常退出時重啟容器,最多重啟 3 次,
always --- 在容器退出時總是重啟容器,
unless-stopped --- 在容器退出時總是重啟容器,但是不考慮在 Docker 守護行程啟動時就已經停止了的容器,
5、為鏡像打標簽
[root@c7-1 ~]#docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
nginx latest ea335eea17ab 2 weeks ago 141MB
registry latest b8604a3fe854 2 weeks ago 26.2MB
centos 7 eeb6ee3f44bd 2 months ago 204MB
[root@c7-1 ~]#docker tag centos:7 192.168.10.20:5000/centos:test1
[root@c7-1 ~]#docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
nginx latest ea335eea17ab 2 weeks ago 141MB
registry latest b8604a3fe854 2 weeks ago 26.2MB
centos 7 eeb6ee3f44bd 2 months ago 204MB
192.168.10.20:5000/centos test1 eeb6ee3f44bd 2 months ago 204MB
6、上傳到私有倉庫
[root@c7-1 ~]#docker push 192.168.10.20:5000/centos:test1
The push refers to repository [192.168.10.20:5000/centos]
174f56854903: Pushed
test1: digest: sha256:dead07b4d8ed7e29e98de0f4504d87e8880d4347859d839686a31da35a3b532f size: 529
7、列出私有倉庫的所有鏡像
[root@c7-1 ~]#curl -XGET http://192.168.10.20:5000/v2/_catalog
{"repositories":["centos"]}
8、列出私有倉庫的 centos 鏡像有哪些 tag
root@c7-1 ~]#curl -XGET http://192.168.10.20:5000/v2/centos/tags/list
{"name":"centos","tags":["test1"]}
9、洗掉原有 centos 鏡像,測驗私有倉庫下載
[root@c7-1 ~]#docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
nginx latest ea335eea17ab 2 weeks ago 141MB
registry latest b8604a3fe854 2 weeks ago 26.2MB
192.168.10.20:5000/centos test1 eeb6ee3f44bd 2 months ago 204MB
centos 7 eeb6ee3f44bd 2 months ago 204MB
[root@c7-1 ~]#docker rmi -f 192.168.10.20:5000/centos:test1 centos:7 &> /dev/null
[root@c7-1 ~]#docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
nginx latest ea335eea17ab 2 weeks ago 141MB
registry latest b8604a3fe854 2 weeks ago 26.2MB
[root@c7-1 ~]#docker pull 192.168.10.20:5000/centos:test1 &> /dev/null
[root@c7-1 ~]#docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
nginx latest ea335eea17ab 2 weeks ago 141MB
registry latest b8604a3fe854 2 weeks ago 26.2MB
192.168.10.20:5000/centos test1 eeb6ee3f44bd 2 months ago 204MB
二、Harbor
1、harbor介紹
Harbor是一個用于存盤和分發docker鏡像的企業級Registry服務器,由VMware開源,其通過添加一些企業必需的功能特性,例如安全、標識和管理等,擴展了開源Docker Distrubution,作為一個企業級私有Registry服務器,Harbor提供了更好的性能和安全,提升了用戶使用Registry構建和運行環境傳輸鏡像的效率,Harbor支持安裝在多個Registry節點的鏡像資源復制,鏡像全部保存在私有Registry中,確保資料和知識產權在公司內部網路中管理,另外,Harbor也提供了高級的安全特性,諸如用戶管理,訪問控制和活動審計等,
因為是vmware出品的,所以支持下面幾種部署方式
- 在線安裝
- 離線安裝
- ova安裝,這個直接在vcenter上匯入就可以了
官方最小配置
- 2個cpu
- 4g記憶體
- 40g硬碟,因為是存盤鏡像的所以推薦硬碟大點
2、Harbor功能介紹
- 基于角色的訪問控制:用戶與docker鏡像倉庫通過專案進行組織管理,一個用戶可以對多個鏡像倉庫在同一命名空間里有不同的權限,
- 鏡像復制:鏡像可在多個Registry實體中復制,尤其適合負載均衡,高可用,混合云和多云場景,
- 圖形化用戶界面:用戶可以通過瀏覽器來瀏覽,檢索當前Docker鏡像倉庫,管理專案和命名空間,
- AD/LDAP支持:Harbor可以集成企業內部已有的AD/LDAP,用于鑒權認證管理,
- 審計管理:所有針對鏡像倉庫的操作都可以被記錄追溯,用于審計管理,
- 國際化:已擁有英文,中文、德文、日文和俄文的本地化版本,更多的語言將會添加進來,
- RESTful API:提供給管理員對于Harbor更多的操控,使得與其它管理軟體集成變得更容易,
- 部署簡單:提供在線和離線兩種安裝工具,也可以安裝到vSphere平臺虛擬設備,
3、Harbor組成



- proxy:對應啟動組件nginx,它是一個nginx反向代理,代理Notary client(鏡像認證)、docker client(鏡像上傳下載)和瀏覽器的訪問請求(Core Service)給后端的各服務器,
- UI(Core Service):對應啟動組件harbor-ui,底層資料存盤使用mysql資料庫,主要提供了四個子功能,
- UI:一個web管理頁面ui
- API:Harbor暴露的API服務,
- Auth:用戶認證服務,decode后的token中的用戶資訊在這里進行認證;auth后端可以接db、ldap、uaa三種認證實作,
- Token服務:負責根據用戶在每個project中的role來為每個docker push/pull 命令發布一個token,如果docker client發送給registry的請求沒有帶token,registry會重定向請求到token服務創建token,
- Registry:對應啟動組件registry,負責存盤鏡像檔案和處理鏡像的pull/push命令,Harbor對鏡像進行強制的訪問控制,Registry會將每個客戶端的每個pull/push請求轉發到token服務來獲取有效的token,
- Admin Service:對應啟動組件harbor-admin server,是系統的配置管理中心附帶檢查存盤用量,ui和jobserver啟動時需要加載adminserver配置,
- job server:對應啟動組件harbor-jobservice,負責鏡像復制作業,塔河Registry通信,從一個Registry pull鏡像然后push到另一個Registry,并記錄job_log.
- Log Collector:對應啟動組件harbor-log,日志匯總組件,通過docker的log-driver把日志匯總到一起,
- DB:對應啟動組件harbor-db,負責存盤project、user、role、replication、image_scan、access等的metadata資料,
4、Harbor的誤區
誤區一: Harbor是負責存盤容器鏡像的 (Harbor是鏡像倉庫,那么它就應當是存盤鏡像的)
其實關于鏡像的存盤,Harbor使用的是官方的docker registry服務去完成,至于registry是用本地存盤或者s3都是可以的,Harbor的功能是在此之上提供用戶權限管理、鏡像復制等功能,提高使用的registry的效率,
誤區二:Harbor鏡像復制是存盤直接復制 (鏡像的復制,很多人以為應該是鏡像分層檔案的直接拷貝)
其實Harbor鏡像復制采用了一個更加通用、高屋建瓴的做法,通過docker registry 的API去拷貝,這不是省事,這種做法屏蔽了繁瑣的底層檔案操作、不僅可以利用現有docker registry功能不必重復造輪子,而且可以解決沖突和一致性的問題,
三、Harbor 部署
1、下載harbor安裝包
方法1:下載離線安裝包
推薦使用離線安裝包
root@node01:~# cd /opt/
root@node01:/opt# wget https://github.com/goharbor/harbor/releases/download/v1.10.9/harbor-offline-installer-v1.10.9.tgz
方法2:下載在線安裝包
不推薦在線安裝
root@node01:~# cd /opt/
root@node01:/opt# wet https://github.com/goharbor/harbor/releases/download/v1.10.9/harbor-online-installer-v1.10.9.tgz
2、配置harbor
2.1 解壓harbor
root@node01:/opt# tar xf harbor-offline-installer-v1.10.9.tgz -C /usr/local/
root@node01:~# ls -l /usr/local/harbor/
total 585880
-rw-r--r-- 1 root root 11347 Oct 28 13:24 LICENSE
-rw-r--r-- 1 root root 3398 Oct 28 13:24 common.sh
-rw-r--r-- 1 root root 599900167 Oct 28 13:25 harbor.v1.10.9.tar.gz
-rw-r--r-- 1 root root 5882 Oct 28 13:24 harbor.yml
-rwxr-xr-x 1 root root 2284 Oct 28 13:24 install.sh
-rwxr-xr-x 1 root root 1749 Oct 28 13:24 prepare
2.2 編輯組態檔
root@node01:~# vim /usr/local/harbor/harbor.yml
hostname: 192.168.75.157 #修改此行,指向當前主機IP或FQDN
http:
# port for http, default is 80. If https enabled, this port will redirect to https port
port: 80
.....
2.3 運行安裝腳本
root@node01:~# mkdir -pv /data/harbor
root@node01:~# mkdir -pv /var/log/harbor
root@node01:~# /usr/local/harbor/install.sh --with-clair --with-chartmuseum
[Step 0]: checking if docker is installed ...
Note: docker version: 20.10.10
[Step 1]: checking docker-compose is installed ...
Note: docker-compose version: 2.1.0
[Step 2]: loading Harbor images ...
Loaded image: goharbor/harbor-core:v1.10.9
Loaded image: goharbor/harbor-jobservice:v1.10.9
Loaded image: goharbor/notary-signer-photon:v1.10.9
Loaded image: goharbor/nginx-photon:v1.10.9
Loaded image: goharbor/chartmuseum-photon:v1.10.9
Loaded image: goharbor/registry-photon:v1.10.9
....
? ----Harbor has been installed and started successfully.----
2.4 驗證安裝鏡像
root@node01:~# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9aaeebfffd29 goharbor/harbor-jobservice:v1.10.9 "/harbor/harbor_jobs…" 11 minutes ago Up 11 minutes (healthy) harbor-jobservice
d535d03c98c7 goharbor/nginx-photon:v1.10.9 "nginx -g 'daemon of…" 11 minutes ago Up 11 minutes (healthy) 0.0.0.0:80->8080/tcp, :::80->8080/tcp nginx
0c783b6ffbe7 goharbor/clair-adapter-photon:v1.10.9 "/clair-adapter/clai…" 11 minutes ago Up 11 minutes (healthy) 8080/tcp clair-adapter
106983da168c goharbor/harbor-core:v1.10.9 "/harbor/harbor_core" 11 minutes ago Up 11 minutes (healthy) harbor-core
51b0af17bd82 goharbor/clair-photon:v1.10.9 "./docker-entrypoint…" 11 minutes ago Up 11 minutes (healthy) 6060-6061/tcp clair
ad892f1ec253 goharbor/chartmuseum-photon:v1.10.9 "./docker-entrypoint…" 11 minutes ago Up 11 minutes (healthy) 9999/tcp chartmuseum
8b2790876a6c goharbor/harbor-portal:v1.10.9 "nginx -g 'daemon of…" 11 minutes ago Up 11 minutes (healthy) 8080/tcp harbor-portal
55ed41a08594 goharbor/harbor-registryctl:v1.10.9 "/home/harbor/start.…" 11 minutes ago Up 11 minutes (healthy) registryctl
41a01a51d5c5 goharbor/redis-photon:v1.10.9 "redis-server /etc/r…" 11 minutes ago Up 11 minutes (healthy) 6379/tcp redis
dd15258fae36 goharbor/harbor-db:v1.10.9 "/docker-entrypoint.…" 11 minutes ago Up 11 minutes (healthy) 5432/tcp harbor-db
1fb1d2af58a7 goharbor/registry-photon:v1.10.9 "/home/harbor/entryp…" 11 minutes ago Up 11 minutes (healthy) 5000/tcp registry
13a5b9359121 goharbor/harbor-log:v1.10.9 "/bin/sh -c /usr/loc…" 11 minutes ago Up 11 minutes (healthy) 127.0.0.1:1514->10514/tcp harbor-log
2.5 查看本地埠
root@node01:~# ss -tnlp
State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
LISTEN 0 4096 127.0.0.1:1514 0.0.0.0:* users:(("docker-proxy",pid=33987,fd=4))
LISTEN 0 4096 0.0.0.0:80 0.0.0.0:* users:(("docker-proxy",pid=34824,fd=4))
LISTEN 0 4096 127.0.0.53%lo:53 0.0.0.0:* users:(("systemd-resolve",pid=791,fd=13))
LISTEN 0 128 0.0.0.0:22 0.0.0.0:* users:(("sshd",pid=881,fd=3))
LISTEN 0 128 127.0.0.1:6010 0.0.0.0:* users:(("sshd",pid=1036,fd=10))
LISTEN 0 128 127.0.0.1:6011 0.0.0.0:* users:(("sshd",pid=11675,fd=10))
LISTEN 0 4096 [::]:80 [::]:* users:(("docker-proxy",pid=34830,fd=4))
LISTEN 0 128 [::]:22 [::]:* users:(("sshd",pid=881,fd=4))
LISTEN 0 128 [::1]:6010 [::]:* users:(("sshd",pid=1036,fd=9))
LISTEN 0 128 [::1]:6011 [::]:* users:(("sshd",pid=11675,fd=9))
3、web訪問harbor管理界面
默認管理員admin ;密碼 Harbor12345

登錄成功界面
四、配置Harbor開機啟動
1、配置harbor.service檔案
root@node01:~# cat /lib/systemd/system/harbor.service
[Unit]
Description=Harbor
after=docker.service systemd-networkd.service systemd-resolved.service
Requires=docker.service
Documentation=https://goharbor.io/
[Service]
Type=simple
Restart=on-failure
ExecStart=/usr/local/sbin/docker-compose -f /usr/local/harbor/docker-compose.yml up
ExecStop=/usr/local/sbin/docker-compose -f /usr/local/harbor/docker-compose.yml down
2、Harbor開機啟動
root@node01:~# systemctl enable harbor
Created symlink /etc/systemd/system/multi-user.target.wants/harbor.service → /lib/systemd/system/harbor.service.
root@node01:~# systemctl restart harbor
root@node01:~# systemctl status harbor
● harbor.service - Harbor
Loaded: loaded (/lib/systemd/system/harbor.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2021-11-04 17:01:19 CST; 4s ago
Docs: https://goharbor.io/
Main PID: 31151 (docker-compose)
Tasks: 6 (limit: 2245)
Memory: 8.1M
CGroup: /system.slice/harbor.service
└─31151 /usr/local/sbin/docker-compose -f /usr/local/harbor/docker-compose.yml up
Nov 04 17:01:20 node01 docker-compose[31151]: Container registryctl Running
Nov 04 17:01:20 node01 docker-compose[31151]: Container registry Running
Nov 04 17:01:20 node01 docker-compose[31151]: Container harbor-core Running
Nov 04 17:01:20 node01 docker-compose[31151]: Container harbor-jobservice Running
Nov 04 17:01:20 node01 docker-compose[31151]: Container nginx Running
Nov 04 17:01:20 node01 docker-compose[31151]: Attaching to harbor-core, harbor-db, harbor-jobservice, harbor-log, harbor-portal,>
Nov 04 17:01:21 node01 docker-compose[31151]: harbor-portal | 172.18.0.8 - - [04/Nov/2021:09:01:21 +0000] "GET / HTTP/1.1" >
Nov 04 17:01:21 node01 docker-compose[31151]: registry | 172.18.0.8 - - [04/Nov/2021:09:01:21 +0000] "GET / HTTP/1.1" >
Nov 04 17:01:21 node01 docker-compose[31151]: registryctl | 172.18.0.8 - - [04/Nov/2021:09:01:21 +0000] "GET /api/health >
Nov 04 17:01:22 node01 docker-compose[31151]: registry | 127.0.0.1 - - [04/Nov/2021:09:01:22 +0000] "GET / HTTP/1.1" 2>
五、配置docker使用harbor倉庫
1、配置docker
1.1 配置daemon.json
root@node01:~# cat /etc/docker/daemon.json
{
"insecure-registries" : ["192.168.75.157"]
}
1.2 重啟docker
root@node01:~# systemctl restart docker
1.3 命令列登錄harbor
root@node01:~# docker login 192.168.75.157
Username: admin
Password:
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store
Login Succeeded
2、創建harbor專案

3、測驗上傳鏡像
準備鏡像
root@node01:~# docker pull nginx
鏡像打tag
root@node01:~# docker tag nginx:latest 192.168.75.157/wgs-test/nginx:v1
鏡像上傳
root@node01:~# docker push 192.168.75.157/wgs-test/nginx:v1
The push refers to repository [192.168.75.157/wgs-test/nginx]
9959a332cf6e: Pushed
f7e00b807643: Pushed
f8e880dfc4ef: Pushed
788e89a4d186: Pushed
43f4e41372e4: Pushed
e81bff2725db: Pushed
v1: digest: sha256:7250923ba3543110040462388756ef099331822c6172a050b12c7a38361ea46f size: 1570
4、harbor界面驗證鏡像
5、驗證鏡像資訊
6、測驗下載鏡像
6.1 洗掉存在的鏡像
root@node01:~# docker rmi nginx
Untagged: nginx:latest
Untagged: nginx@sha256:644a70516a26004c97d0d85c7fe1d0c3a67ea8ab7ddf4aff193d9f301670cf36
root@node01:~# docker rmi 192.168.75.157/wgs-test/nginx:v1
Untagged: 192.168.75.157/wgs-test/nginx:v1
Untagged: 192.168.75.157/wgs-test/nginx@sha256:7250923ba3543110040462388756ef099331822c6172a050b12c7a38361ea46f
Deleted: sha256:87a94228f133e2da99cb16d653cd1373c5b4e8689956386c1c12b60a20421a02
Deleted: sha256:55b6972054b24c53054322a52748324df5797eefbb6dc374e41522a91d532dd5
Deleted: sha256:6b88aa6f4485486bfc779cccfbe4a7a47a502a7cff2cd70be89c59dcd0db12a8
Deleted: sha256:472c64059965c7b6b1b534ba07374c1d034b17c99acb3cf4534fe78abed41101
Deleted: sha256:788a5cf1e4599312b5923694f53e556ba0e2eb4a6bbb51958e0ec2b510345a49
Deleted: sha256:410f31f9ae37c62af85e8f9575c5f4d75542be1739ac1ca5982cf461be0b13bc
Deleted: sha256:e81bff2725dbc0bf2003db10272fef362e882eb96353055778a66cda430cf81b
6.2 拉取鏡像
root@node01:~# docker pull 192.168.75.157/wgs-test/nginx:v1
v1: Pulling from wgs-test/nginx
b380bbd43752: Pull complete
fca7e12d1754: Pull complete
745ab57616cb: Pull complete
a4723e260b6f: Pull complete
1c84ebdff681: Pull complete
858292fd2e56: Pull complete
Digest: sha256:7250923ba3543110040462388756ef099331822c6172a050b12c7a38361ea46f
Status: Downloaded newer image for 192.168.75.157/wgs-test/nginx:v1
192.168.75.157/wgs-test/nginx:v1
6.3 從鏡像啟動容器并驗證
root@node01:~# docker run -d -p 8080:80 192.168.75.157/wgs-test/nginx:v1
703e032825acc8f5042e834d989c229b79d3f4be1588b993b953e8c60d69be68
6.4 驗證埠
root@node01:~# ss -tnlp
State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
LISTEN 0 4096 127.0.0.1:1514 0.0.0.0:* users:(("docker-proxy",pid=33987,fd=4))
LISTEN 0 4096 0.0.0.0:80 0.0.0.0:* users:(("docker-proxy",pid=34824,fd=4))
LISTEN 0 4096 127.0.0.53%lo:53 0.0.0.0:* users:(("systemd-resolve",pid=791,fd=13))
LISTEN 0 128 0.0.0.0:22 0.0.0.0:* users:(("sshd",pid=881,fd=3))
LISTEN 0 128 127.0.0.1:6010 0.0.0.0:* users:(("sshd",pid=1036,fd=10))
LISTEN 0 128 127.0.0.1:6011 0.0.0.0:* users:(("sshd",pid=11675,fd=10))
LISTEN 0 4096 [::]:80 [::]:* users:(("docker-proxy",pid=34830,fd=4))
LISTEN 0 128 [::]:22 [::]:* users:(("sshd",pid=881,fd=4))
LISTEN 0 128 [::1]:6010 [::]:* users:(("sshd",pid=1036,fd=9))
LISTEN 0 128 [::1]:6011 [::]:* users:(("sshd",pid=11675,fd=9))
root@node01:~# lsof -i:8090
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
docker-pr 20902 root 4u IPv4 190561 0t0 TCP *:http-alt (LISTEN)
6.5 驗證web訪問
總結
通過本文的總結,對harbor的部署和鏡像應用,有了清晰的認識,harbor能批量管理鏡像,在企業中起到很大作用,
轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/374680.html
標籤:其他
上一篇:ENSP配置路由條目
