前情提要
我的系统环境是:CentOS Linux release 7.7.1908 (Core)
安装Harbor之前需要先安装好Docker、docker-compose(这两项的安装就不赘述了)
Harbor简介
Harbor是一个开源的项目,用于存储和分发Docker镜像的企业级Registry服务器,他扩展了Docker Distribution,提供了简洁的WebUI界面,角色用户管理,访问控制,日志查询,支持在registry之间复制镜像,安全漏洞扫描等等;简单来说,Harbor是海港、海湾,而Docker容器是集装箱,集装箱存放于港口码头。
他目前发布在GitHub上Release的版本地址:https://github.com/goharbor/harbor/releases
我下载的是离线安装包,你可以wget 或者 迅雷 都可以。
下载地址:https://github.com/goharbor/harbor/releases/download/v1.10.1/harbor-offline-installer-v1.10.1.tgz
安装开始
- 下载好安装包
[listlessp@VM_0_6_centos ~]$ ll
total 658284
-rw-rw-r-- 1 listlessp listlessp 674078519 Mar 8 13:42 harbor-offline-installer-v1.10.1.tgz
- 解压&移动目录
[listlessp@VM_0_6_centos ~]$ tar -zxvf harbor-offline-installer-v1.10.1.tgz
harbor/harbor.v1.10.1.tar.gz
harbor/prepare
harbor/LICENSE
harbor/install.sh
harbor/common.sh
harbor/harbor.yml
[listlessp@VM_0_6_centos ~]$ ll
total 658288
drwxrwxr-x 2 listlessp listlessp 4096 Mar 8 15:44 harbor
-rw-rw-r-- 1 listlessp listlessp 674078519 Mar 8 13:42 harbor-offline-installer-v1.10.1.tgz
从这里开始我是用root用户操作的
[root@VM_0_6_centos listlessp]# mv harbor /usr/local/
[root@VM_0_6_centos listlessp]# cd /usr/local/
[root@VM_0_6_centos local]# ll
total 56
drwxr-xr-x. 2 root root 4096 Mar 7 12:08 bin
drwxr-xr-x. 2 root root 4096 Apr 11 2018 etc
drwxr-xr-x. 2 root root 4096 Apr 11 2018 games
drwxr-xr-x 2 root root 4096 Mar 8 13:45 harbor
-
生成证书
如果是有域名的手上应该有证书文件,如果是没有域名或是本地机器的那就通过openssl 生成证书。
创建证书目录
mkdir -p /data/cert && cd /data/cert
生成CA私钥
openssl genrsa -out ca.key 2048
利用CA私钥产生CA证书
openssl req -x509 -new -nodes -key ca.key -days 3650 -out ca.crt -subj "/CN=harbor-ca"
生成服务器端私钥和csr签名请求文件
openssl req -newkey rsa:4096 -nodes -sha256 -keyout server.key -out server.csr
为服务器签署证书生成server.crt
[root@VM_0_6_centos cert]# echo subjectAltName = IP:172.17.0.6 > extfile.cnf
[root@VM_0_6_centos cert]# ll
total 20
-rw-r--r-- 1 root root 1094 Mar 8 13:58 ca.crt
-rw-r--r-- 1 root root 1675 Mar 8 13:58 ca.key
-rw-r--r-- 1 root root 31 Mar 8 14:07 extfile.cnf
-rw-r--r-- 1 root root 1691 Mar 8 14:05 server.csr
-rw-r--r-- 1 root root 3272 Mar 8 14:05 server.key
[root@VM_0_6_centos cert]# openssl x509 -req -in server.csr -CA ca.crt -CAkey ca.key -CAcreateserial -days 3650 -extfile extfile.cnf -out server.crt
Signature ok
subject=/C=CN/ST=HuNan/L=ChangSha/O=Listlessp/emailAddress=mctavi@qq.com
Getting CA Private Key
[root@VM_0_6_centos cert]# ll
total 28
-rw-r--r-- 1 root root 1094 Mar 8 13:58 ca.crt
-rw-r--r-- 1 root root 1675 Mar 8 13:58 ca.key
-rw-r--r-- 1 root root 17 Mar 8 14:07 ca.srl
-rw-r--r-- 1 root root 31 Mar 8 14:07 extfile.cnf
-rw-r--r-- 1 root root 1464 Mar 8 14:07 server.crt
-rw-r--r-- 1 root root 1691 Mar 8 14:05 server.csr
-rw-r--r-- 1 root root 3272 Mar 8 14:05 server.key
- 编辑Harbor配置文件
记得是要先进入harbor目录:cd /usr/local/harbor/
[root@VM_0_6_centos harbor]# vim harbor.yml
# Configuration file of Harbor
# The IP address or hostname to access admin UI and registry service.
# DO NOT use localhost or 127.0.0.1, because Harbor needs to be accessed by external clients. 设定域名
hostname: dockerhub.listlessp.com
# http related config
http:
# port for http, default is 80. If https enabled, this port will redirect to https port
port: 80
# https related config 开启Https
https:
# https port for harbor, default is 443
port: 443
# The path of cert and key files for nginx 证书文件 证书key
certificate: /data/cert/server.crt
private_key: /data/cert/server.key
# Uncomment external_url if you want to enable external proxy
# And when it enabled the hostname will no longer used
# external_url: https://reg.mydomain.com:8433
# The initial password of Harbor admin
# It only works in first time to install harbor
# Remember Change the admin password from UI after launching Harbor. 管理员密码
harbor_admin_password: easy123456
# Harbor DB configuration
database:
# The password for the root user of Harbor DB. Change this before any production use. 数据库密码
password: tooeasy123
# The maximum number of connections in the idle connection pool. If it <=0, no idle connections are retained.
max_idle_conns: 50
# The maximum number of open connections to the database. If it <= 0, then there is no limit on the number of open connections.
# Note: the default number of connections is 100 for postgres.
max_open_conns: 100
# The default data volume 数据存储路径
data_volume: /data/harbor
- 执行安装脚本
[root@VM_0_6_centos harbor]# ./install.sh
[Step 0]: checking if docker is installed ...
Note: docker version: 19.03.7
[Step 1]: checking docker-compose is installed ...
Note: docker-compose version: 1.25.4
[Step 2]: loading Harbor images ...
47a4bb1cfbc7: Loading layer [==================================================>] 34.26MB/34.26MB
c2d9cf7a4eaf: Loading layer [==================================================>] 9.056MB/9.056MB
32b7eca4f03e: Loading layer [==================================================>] 9.71MB/9.71MB
5d104292391f: Loading layer [==================================================>] 9.71MB/9.71MB
Loaded image: goharbor/clair-adapter-photon:v1.0.1-v1.10.1
0039915754c6: Loading layer [==================================================>] 12.83MB/12.83MB
0a4ba5bc8bc2: Loading layer [==================================================>] 49.37MB/49.37MB
Loaded image: goharbor/harbor-jobservice:v1.10.1
db95a8bece9e: Loading layer [==================================================>] 78.32MB/78.32MB
f9aa9f9a3393: Loading layer [==================================================>] 3.072kB/3.072kB
f0baa86a6ccd: Loading layer [==================================================>] 59.9kB/59.9kB
2b8f0a44b78f: Loading layer [==================================================>] 61.95kB/61.95kB
Loaded image: goharbor/redis-photon:v1.10.1
a9f6374f6301: Loading layer [==================================================>] 9.05MB/9.05MB
b3c39a738965: Loading layer [==================================================>] 6.239MB/6.239MB
dce1aa68054e: Loading layer [==================================================>] 16.04MB/16.04MB
612aac9b538e: Loading layer [==================================================>] 28.24MB/28.24MB
8612386fb841: Loading layer [==================================================>] 22.02kB/22.02kB
53883649d694: Loading layer [==================================================>] 50.52MB/50.52MB
Loaded image: goharbor/notary-server-photon:v0.6.1-v1.10.1
f3967aa0de5f: Loading layer [==================================================>] 115.8MB/115.8MB
42fd590be962: Loading layer [==================================================>] 12.14MB/12.14MB
096b03f3e32b: Loading layer [==================================================>] 3.072kB/3.072kB
aa66bf3b8224: Loading layer [==================================================>] 49.15kB/49.15kB
8e76391190c9: Loading layer [==================================================>] 3.584kB/3.584kB
131573c722d5: Loading layer [==================================================>] 13.02MB/13.02MB
Loaded image: goharbor/clair-photon:v2.1.1-v1.10.1
69e43242ff64: Loading layer [==================================================>] 50.39MB/50.39MB
5a3a8e835993: Loading layer [==================================================>] 3.584kB/3.584kB
4dff480c159c: Loading layer [==================================================>] 3.072kB/3.072kB
2be454a39481: Loading layer [==================================================>] 2.56kB/2.56kB
d6b4877d5c4e: Loading layer [==================================================>] 3.072kB/3.072kB
609537197cce: Loading layer [==================================================>] 3.584kB/3.584kB
b52d06cad304: Loading layer [==================================================>] 12.29kB/12.29kB
Loaded image: goharbor/harbor-log:v1.10.1
badcf9296df7: Loading layer [==================================================>] 9.056MB/9.056MB
8b17ed0102b2: Loading layer [==================================================>] 3.584kB/3.584kB
4d1cd50b8d4f: Loading layer [==================================================>] 3.072kB/3.072kB
491c41e50d6a: Loading layer [==================================================>] 21.76MB/21.76MB
0101dc4148c7: Loading layer [==================================================>] 22.59MB/22.59MB
Loaded image: goharbor/registry-photon:v2.7.1-patch-2819-2553-v1.10.1
77965b8f534b: Loading layer [==================================================>] 14.61MB/14.61MB
940bf05c9601: Loading layer [==================================================>] 28.24MB/28.24MB
7ca206eb72e3: Loading layer [==================================================>] 22.02kB/22.02kB
9898774a5bad: Loading layer [==================================================>] 49.09MB/49.09MB
Loaded image: goharbor/notary-signer-photon:v0.6.1-v1.10.1
86340c56281e: Loading layer [==================================================>] 9.055MB/9.055MB
8ac45c34690f: Loading layer [==================================================>] 42.31MB/42.31MB
4aa70453f992: Loading layer [==================================================>] 3.072kB/3.072kB
6cbc6ab111b2: Loading layer [==================================================>] 3.584kB/3.584kB
d6d7b70c18b5: Loading layer [==================================================>] 43.14MB/43.14MB
Loaded image: goharbor/chartmuseum-photon:v0.9.0-v1.10.1
07efa003923d: Loading layer [==================================================>] 9.056MB/9.056MB
96dd65c291de: Loading layer [==================================================>] 3.584kB/3.584kB
802a1397679e: Loading layer [==================================================>] 21.76MB/21.76MB
92c283f6895a: Loading layer [==================================================>] 3.072kB/3.072kB
8b61b91240a6: Loading layer [==================================================>] 8.662MB/8.662MB
1fd753477b6f: Loading layer [==================================================>] 31.24MB/31.24MB
Loaded image: goharbor/harbor-registryctl:v1.10.1
48cda078e98d: Loading layer [==================================================>] 10.89MB/10.89MB
Loaded image: goharbor/nginx-photon:v1.10.1
2c00d9af2c3f: Loading layer [==================================================>] 34.31MB/34.31MB
0e4ae15c3d4e: Loading layer [==================================================>] 339.9MB/339.9MB
27810c9ff1a9: Loading layer [==================================================>] 135.2kB/135.2kB
Loaded image: goharbor/harbor-migrator:v1.10.1
93e0577272a9: Loading layer [==================================================>] 34.24MB/34.24MB
fb3507ff707e: Loading layer [==================================================>] 117.4MB/117.4MB
f59c6315bf8a: Loading layer [==================================================>] 42.32MB/42.32MB
5c5501748347: Loading layer [==================================================>] 2.56kB/2.56kB
3710d94e58dd: Loading layer [==================================================>] 1.536kB/1.536kB
06e0f1585c01: Loading layer [==================================================>] 166.4kB/166.4kB
bf5ac9b9c61c: Loading layer [==================================================>] 3.01MB/3.01MB
Loaded image: goharbor/prepare:v1.10.1
9ea2dad46741: Loading layer [==================================================>] 10.89MB/10.89MB
b280b9e7ca3b: Loading layer [==================================================>] 7.696MB/7.696MB
a1ce7c1130ee: Loading layer [==================================================>] 223.2kB/223.2kB
3b0492a7358b: Loading layer [==================================================>] 195.1kB/195.1kB
c64d6e6c80dd: Loading layer [==================================================>] 15.36kB/15.36kB
ace4e9064f06: Loading layer [==================================================>] 3.584kB/3.584kB
Loaded image: goharbor/harbor-portal:v1.10.1
b74d8257d4e7: Loading layer [==================================================>] 12.83MB/12.83MB
92f141040819: Loading layer [==================================================>] 42.5MB/42.5MB
33c99383fac5: Loading layer [==================================================>] 5.632kB/5.632kB
2bacc160d10f: Loading layer [==================================================>] 40.45kB/40.45kB
f51bed904fbe: Loading layer [==================================================>] 42.5MB/42.5MB
Loaded image: goharbor/harbor-core:v1.10.1
a2ffdaaa3434: Loading layer [==================================================>] 63.56MB/63.56MB
5745ac9e0297: Loading layer [==================================================>] 54.44MB/54.44MB
dc1d24cbb1d5: Loading layer [==================================================>] 5.632kB/5.632kB
4280f2f98340: Loading layer [==================================================>] 2.048kB/2.048kB
0f9279b20eec: Loading layer [==================================================>] 2.56kB/2.56kB
8b9162d25131: Loading layer [==================================================>] 2.56kB/2.56kB
50ad7481e5af: Loading layer [==================================================>] 2.56kB/2.56kB
54b809bfb5ec: Loading layer [==================================================>] 10.24kB/10.24kB
Loaded image: goharbor/harbor-db:v1.10.1
[Step 3]: preparing environment ...
[Step 4]: preparing harbor configs ...
prepare base dir is set to /usr/local/harbor
Generated configuration file: /config/log/logrotate.conf
Generated configuration file: /config/log/rsyslog_docker.conf
Generated configuration file: /config/nginx/nginx.conf
Generated configuration file: /config/core/env
Generated configuration file: /config/core/app.conf
Generated configuration file: /config/registry/config.yml
Generated configuration file: /config/registryctl/env
Generated configuration file: /config/db/env
Generated configuration file: /config/jobservice/env
Generated configuration file: /config/jobservice/config.yml
Generated and saved secret to file: /secret/keys/secretkey
Generated certificate, key file: /secret/core/private_key.pem, cert file: /secret/registry/root.crt
Generated configuration file: /compose_location/docker-compose.yml
Clean up the input dir
[Step 5]: starting Harbor ...
Creating network "harbor_harbor" with the default driver
Creating harbor-log ... done
Creating redis ...
Creating registry ... error
Creating registryctl ...
Creating redis ... done
Creating harbor-portal ...
Creating registryctl ... done
Creating harbor-db ... done
Creating harbor-portal ... done
ERROR: for registry Cannot create container for service registry: Conflict. The container name "/registry" is already in use by container "6d0674c0277587e405dc9c9b051d503e3c574439d19abe36c66a82e6ea7d78da". You have to remove (or rename) that container to be able to reuse that name.
ERROR: Encountered errors while bringing up the project.
上面的ERROR是因为我之前已经使用registry镜像构建了私服,并且容器命名也叫registry,而harbor也使用了这个所以出现冲突,上面ERROR信息已经写得很清楚,我就删除了自己的registry命名的容器,然后再次运行安装脚本即可。
[root@VM_0_6_centos harbor]# ./install.sh
[Step 0]: checking if docker is installed ...
Note: docker version: 19.03.7
[Step 1]: checking docker-compose is installed ...
Note: docker-compose version: 1.25.4
[Step 2]: loading Harbor images ...
Loaded image: goharbor/clair-adapter-photon:v1.0.1-v1.10.1
Loaded image: goharbor/harbor-jobservice:v1.10.1
Loaded image: goharbor/redis-photon:v1.10.1
Loaded image: goharbor/notary-server-photon:v0.6.1-v1.10.1
Loaded image: goharbor/clair-photon:v2.1.1-v1.10.1
Loaded image: goharbor/harbor-log:v1.10.1
Loaded image: goharbor/registry-photon:v2.7.1-patch-2819-2553-v1.10.1
Loaded image: goharbor/notary-signer-photon:v0.6.1-v1.10.1
Loaded image: goharbor/chartmuseum-photon:v0.9.0-v1.10.1
Loaded image: goharbor/harbor-registryctl:v1.10.1
Loaded image: goharbor/nginx-photon:v1.10.1
Loaded image: goharbor/harbor-migrator:v1.10.1
Loaded image: goharbor/prepare:v1.10.1
Loaded image: goharbor/harbor-portal:v1.10.1
Loaded image: goharbor/harbor-core:v1.10.1
Loaded image: goharbor/harbor-db:v1.10.1
[Step 3]: preparing environment ...
[Step 4]: preparing harbor configs ...
prepare base dir is set to /usr/local/harbor
Clearing the configuration file: /config/registryctl/config.yml
Clearing the configuration file: /config/registryctl/env
Clearing the configuration file: /config/db/env
Clearing the configuration file: /config/registry/config.yml
Clearing the configuration file: /config/core/app.conf
Clearing the configuration file: /config/core/env
Clearing the configuration file: /config/log/rsyslog_docker.conf
Clearing the configuration file: /config/log/logrotate.conf
Clearing the configuration file: /config/nginx/nginx.conf
Clearing the configuration file: /config/jobservice/config.yml
Clearing the configuration file: /config/jobservice/env
Generated configuration file: /config/log/logrotate.conf
Generated configuration file: /config/log/rsyslog_docker.conf
Generated configuration file: /config/nginx/nginx.conf
Generated configuration file: /config/core/env
Generated configuration file: /config/core/app.conf
Generated configuration file: /config/registry/config.yml
Generated configuration file: /config/registryctl/env
Generated configuration file: /config/db/env
Generated configuration file: /config/jobservice/env
Generated configuration file: /config/jobservice/config.yml
loaded secret from file: /secret/keys/secretkey
Generated configuration file: /compose_location/docker-compose.yml
Clean up the input dir
[Step 5]: starting Harbor ...
Creating network "harbor_harbor" with the default driver
Creating harbor-log ... done
Creating harbor-portal ... done
Creating redis ... done
Creating harbor-db ... done
Creating registryctl ... done
Creating registry ... done
Creating harbor-core ... done
Creating nginx ... done
Creating harbor-jobservice ... done
✔ ----Harbor has been installed and started successfully.----
- Harbor服务的管理命令
先进入harbor目录:cd /usr/local/harbor/
查看服务运行状态:docker-compose ps
[root@VM_0_6_centos harbor]# docker-compose ps
Name Command State Ports
------------------------------------------------------------------------------------------------------------------------
harbor-core /harbor/harbor_core Up (health: starting)
harbor-db /docker-entrypoint.sh Up (health: starting) 5432/tcp
harbor-jobservice /harbor/harbor_jobservice ... Up (health: starting)
harbor-log /bin/sh -c /usr/local/bin/ ... Up (health: starting) 127.0.0.1:1514->10514/tcp
harbor-portal nginx -g daemon off; Up (health: starting) 8080/tcp
nginx nginx -g daemon off; Up (health: starting) 0.0.0.0:80->8080/tcp, 0.0.0.0:443->8443/tcp
redis redis-server /etc/redis.conf Up (health: starting) 6379/tcp
registry /home/harbor/entrypoint.sh Up (health: starting) 5000/tcp
registryctl /home/harbor/start.sh Up (health: starting
关闭服务:docker-compose down
[root@VM_0_6_centos harbor]# docker-compose down
Stopping harbor-jobservice ... done
Stopping nginx ... done
Stopping harbor-core ... done
Stopping registry ... done
Stopping harbor-db ... done
Stopping redis ... done
Stopping registryctl ... done
Stopping harbor-portal ... done
Stopping harbor-log ... done
Removing harbor-jobservice ... done
Removing nginx ... done
Removing harbor-core ... done
Removing registry ... done
Removing harbor-db ... done
Removing redis ... done
Removing registryctl ... done
Removing harbor-portal ... done
Removing harbor-log ... done
Removing network harbor_harbor
启动服务:docker-compose up -d
[root@VM_0_6_centos harbor]# docker-compose up -d
Creating network "harbor_harbor" with the default driver
Creating harbor-log ... done
Creating registry ... done
Creating redis ... done
Creating harbor-portal ... done
Creating registryctl ... done
Creating harbor-db ... done
Creating harbor-core ... done
Creating nginx ... done
Creating harbor-jobservice ... done
登录Harbor
输入你的地址,例如:dockerhub.listlessp.com;第一次登陆是使用管理员账号admin,密码是刚刚yml文件中配置的harbor_admin_password的值。
创建新用户如下图3步:
创建一个私有的仓库项目
进入该仓库后 点击 镜像仓库,列表右上角有 “推送镜像的docker命令”按钮,点击会展开命令示例。
本地测试私有仓库
如果是采用上面自己生成的自签名证书的,需要在本地docker中设置非安全仓库并重启docker服务
登陆到私有仓库
C:\Users\listlessp>docker login dockerhub.listlessp.com -u kobe -p Kb123456
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
Login Succeeded
标记一个本地镜像归入到私有仓库中(我这里是tag latest版本的所以镜像后面没有跟版本号)
C:\Users\listlessp>docker tag nginx dockerhub.listlessp.com/lakers/nginx
C:\Users\listlessp>docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
testvue 1 f91812c2a92d 21 hours ago 146MB
nginx latest 6678c7c2e56c 3 days ago 127MB
dockerhub.listlessp.com/lakers/nginx latest 6678c7c2e56c 3 days ago 127MB
redis latest 7eed8df88d3b 10 days ago 98.2MB
dockerhub.listlessp.com/library/redis latest 7eed8df88d3b 10 days ago 98.2MB
nginx 1.16 8c5ec390a315 10 days ago 127MB
mysql latest c8ad2be69a22 10 days ago 465MB
mongo latest bcef5fd2979d 2 weeks ago 386MB
centos 7 5e35e350aded 3 months ago 203MB
centos 6 d0957ffdf8a2 11 months ago 194MB
将镜像上传到私有仓库(记得要先执行上面的登陆才能上传)
C:\Users\listlessp>docker push dockerhub.listlessp.com/lakers/nginx
The push refers to repository [dockerhub.listlessp.com/lakers/nginx]
55a77731ed26: Pushed
71f2244bc14d: Pushed
f2cb0ecef392: Mounted from library/redis
latest: digest: sha256:3936fb3946790d711a68c58be93628e43cbca72439079e16d154b5db216b58da size: 948
拉取私有仓库上的镜像
docker pull dockerhub.listlessp.com/lakers/nginx
测试退出后拉取私有仓库上的镜像
C:\Users\listlessp>docker logout dockerhub.listlessp.com
Removing login credentials for dockerhub.listlessp.com
C:\Users\listlessp>docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
testvue 1 f91812c2a92d 24 hours ago 146MB
nginx latest 6678c7c2e56c 3 days ago 127MB
dockerhub.listlessp.com/lakers/nginx latest 6678c7c2e56c 3 days ago 127MB
redis latest 7eed8df88d3b 10 days ago 98.2MB
dockerhub.listlessp.com/library/redis latest 7eed8df88d3b 10 days ago 98.2MB
nginx 1.16 8c5ec390a315 10 days ago 127MB
mysql latest c8ad2be69a22 10 days ago 465MB
mongo latest bcef5fd2979d 2 weeks ago 386MB
centos 7 5e35e350aded 3 months ago 203MB
centos 6 d0957ffdf8a2 11 months ago 194MB
C:\Users\listlessp>docker rmi dockerhub.listlessp.com/lakers/nginx
Untagged: dockerhub.listlessp.com/lakers/nginx:latest
Untagged: dockerhub.listlessp.com/lakers/nginx@sha256:3936fb3946790d711a68c58be93628e43cbca72439079e16d154b5db216b58da
C:\Users\listlessp>docker rmi dockerhub.listlessp.com/library/redis
Untagged: dockerhub.listlessp.com/library/redis:latest
Untagged: dockerhub.listlessp.com/library/redis@sha256:ee1d00c5250b5a886b09be2d5f9506add35dfb557f1ef37a7e4b8f0138f32956
C:\Users\listlessp>docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
testvue 1 f91812c2a92d 24 hours ago 146MB
nginx latest 6678c7c2e56c 3 days ago 127MB
redis latest 7eed8df88d3b 10 days ago 98.2MB
nginx 1.16 8c5ec390a315 10 days ago 127MB
mysql latest c8ad2be69a22 10 days ago 465MB
mongo latest bcef5fd2979d 2 weeks ago 386MB
centos 7 5e35e350aded 3 months ago 203MB
centos 6 d0957ffdf8a2 11 months ago 194MB
C:\Users\listlessp>
C:\Users\listlessp>docker pull dockerhub.listlessp.com/lakers/nginx
Using default tag: latest
Error response from daemon: pull access denied for dockerhub.listlessp.com/lakers/nginx, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
可以看到Error信息里面说明了需要登录才能拉取私有仓库的镜像
来源:oschina
链接:https://my.oschina.net/u/552865/blog/3190169