Loading [MathJax]/jax/output/CommonHTML/config.js
前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >专栏 >Docker镜像私有仓库

Docker镜像私有仓库

作者头像
星哥玩云
发布于 2022-09-15 13:16:01
发布于 2022-09-15 13:16:01
3.3K00
代码可运行
举报
文章被收录于专栏:开源部署开源部署
运行总次数:0
代码可运行

Docker中,当我们执行 docker pull xxx 的时候 ,它实际上是从 hub.docker.com 这个地址去查找,这就是 Docker 公司为我们提供的公共仓库。在工作中,我们不可能把企业项目 push 到公有仓库进行管理。所以为了更好的管理镜像,Docker 不仅提供了一个中央仓库,同时也允许我们搭建本地私有仓库。

docker容器镜像仓库分类:

  • 公网仓库:docker hub
  • 私网仓库: registry、harbor

一、registry镜像仓库

1.1、 registry 仓库搭建

搭建步骤

  • 拉取 registry 容器镜像
  • 创建 registry 仓库容器
  • 测试容器应用

搭建过程 a、拉取registry容器镜像

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
docker pull registry 

b、创建registry仓库容器

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
1、创建持久化存储,将容器镜像存储目录/var/lib/registry挂载到本地/opt/myregistry下:

mkdir /opt/myregistry

2、创建 registry 容器:

docker run -d -p 5000:5000 -v /opt/myregistry:/var/lib/registry  --restart=always registry:latest

3、查看容器是否运行

docker ps

CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                    NAMES
6b20b55fe6f8        registry:latest     "/entrypoint.sh /etc…"   2 minutes ago       Up 2 minutes        0.0.0.0:5000->5000/tcp   busy_mclean

c、测试容器应用

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
[root@zutuanxue_manage01 ~]# curl http://192.168.1.150:5000/v2/_catalog
{"repositories":[]}

显示仓库中没有任何镜像

1.2、registry仓库应用-上传镜像

上传镜像步骤

  • 设置docker仓库为registry本地仓库
  • 给需要存储的镜像打tag
  • 上传镜像到registry仓库

演示案例

将baishuming2020/centos_nginx:latest上传到仓库

查看当前本地镜像

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
[root@zutuanxue_manage01 ~]# docker images
REPOSITORY                     TAG                 IMAGE ID            CREATED             SIZE
baishuming2020/centos_nginx    latest              bcd9f28f6126        33 minutes ago      447MB
baishuming2020/centos_8_base   latest              3e9f682f8459        47 minutes ago      200MB
centos                         latest              0f3e07c0138f        6 weeks ago         220MB
registry                       latest              f32a97de94e1        8 months ago        25.8MB

a、设置docker仓库为registry本地仓库

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
#1、修改docker进程启动文件,修改其启动方式,目的是为了让通过docker配置文件启动
[root@zutuanxue_manage01 ~]# sed -i.bak '/^ExecStart=/c\ExecStart=\/usr\/bin\/dockerd' /usr/lib/systemd/system/docker.service

#2、设置docker 守护进程的配置文件 /etc/docker/daemon.json,默认没有该文件
[root@zutuanxue_manage01 ~]# cat /etc/docker/daemon.json 
{
 "insecure-registries": ["http://192.168.1.150:5000"]
}

insecure-registries 指定非安全的仓库地址,多个用逗号隔开

#3、重启docker生效配置文件
[root@zutuanxue_manage01 ~]# systemctl daemon-reload
[root@zutuanxue_manage01 ~]# systemctl restart docker

b、给需要存储的镜像打tag

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
[root@zutuanxue_manage01 ~]# docker tag baishuming2020/centos_nginx:latest 192.168.1.150:5000/centos_nginx:v1

[root@zutuanxue_manage01 ~]# docker images
REPOSITORY                         TAG                 IMAGE ID            CREATED             SIZE
192.168.98.240:5000/centos_nginx   v1                  bcd9f28f6126        45 minutes ago      447MB
baishuming2020/centos_nginx        latest              bcd9f28f6126        45 minutes ago      447MB
baishuming2020/centos_8_base       latest              3e9f682f8459        59 minutes ago      200MB
centos                             latest              0f3e07c0138f        6 weeks ago         220MB
registry                           latest              f32a97de94e1        8 months ago        25.8MB

c、上传镜像到registry仓库

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
#1、上传镜像
[root@zutuanxue_manage01 ~]# docker push 192.168.98.240:5000/centos_nginx:v1
The push refers to repository [192.168.98.240:5000/centos_nginx]
1da799aaf1ec: Pushed 
f598357997c6: Pushed 
630012d2d35b: Pushed 
4dcde7ab808a: Pushed 
64dc1b92ebb6: Pushed 
7db2133dafb9: Pushed 
fd05189e6e81: Pushed 
ee645629aa71: Pushed 
v1: digest: sha256:507a5ad9dd5771cdf461a6fa24c3fff6ea9eabd6945abf03e9264d3130fe816b size: 1996

#2、查看上传
[root@zutuanxue_manage01 ~]# curl http://192.168.98.240:5000/v2/_catalog
{"repositories":["centos_nginx"]}

#查看存储文件夹
[root@zutuanxue_manage01 ~]# ls /opt/docker_repos/docker/registry/v2/repositories/centos_nginx/
_layers  _manifests  _uploads

1.3、 registry仓库应用-客户端下载镜像

  • 设置客户端docker仓库为registry仓库
  • 拉取镜像到本地

演示案例

要求192.168.98.241[hostname:zutuanxue_node1]机器的容器可以下载registry仓库中的镜像

a、设置192.168.1.151[hostname:zutuanxue_node1]机器的docker仓库为registry仓库

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
#1、设置docker启动文件
[root@zutuanxue_node1 ~]# sed -i.bak '/^ExecStart=/c\ExecStart=\/usr\/bin\/dockerd' /usr/lib/systemd/system/docker.service

#2、设置docker配置文件
[root@zutuanxue_node1 ~]# cat  /etc/docker/daemon.json 
{
 "insecure-registries": ["http://192.168.1.150:5000"]
}

b、下载镜像 192.168.1.151[hostname:zutuanxue_node1]机器上的docker可以拉取registry仓库中的192.168.1.150:5000/centos_nginx:v1容器镜像

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
[root@zutuanxue_node1 ~]# docker pull 192.168.1.150:5000/centos_nginx:v1
v1: Pulling from centos_nginx
dcd04d454f16: Pull complete 
5cb2e05aa6e1: Pull complete 
870634eb98b4: Pull complete 
0fae9697ee4b: Pull complete 
18ad57cfcecb: Pull complete 
64dd6f0d85c1: Pull complete 
7178b0b4388e: Pull complete 
34de8795cd41: Pull complete 
Digest: sha256:507a5ad9dd5771cdf461a6fa24c3fff6ea9eabd6945abf03e9264d3130fe816b
Status: Downloaded newer image for 192.168.98.240:5000/centos_nginx:v1
192.168.98.240:5000/centos_nginx:v1

#验证下载
[root@zutuanxue_node1 ~]# docker images
REPOSITORY                         TAG                 IMAGE ID            CREATED             SIZE
192.168.1.150:5000/centos_nginx   v1                  bcd9f28f6126        4 hours ago         447MB

1.4、registry带basic认证的仓库

实现步骤

  • 安装需要认证的包
  • 创建存放认证信息的文件
  • 创建认证信息
  • 创建带认证的registry容器
  • 指定仓库地址
  • 登录认证

实现过程 a、安装需要认证的包

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
yum -y install httpd-tools

b、创建存放认证信息的文件

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
mkdir -p /opt/registry-var/auth

c、创建认证信息

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
htpasswd -Bbn zutuanxue 123456 >> /opt/registry-var/auth/htpasswd

d、创建带认证的registry容器

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
docker run -d -p 10000:5000 --restart=always --name registry \
-v  /opt/registry-var/auth:/auth \
-v /opt/myregistry:/var/lib/registry \
-e "REGISTRY_AUTH=htpasswd" \
-e "REGISTRY_AUTH_HTPASSWD_REALM=Registry Realm" \
-e REGISTRY_AUTH_HTPASSWD_PATH=/auth/htpasswd \
registry:latest

e、指定仓库地址

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
cat /etc/docker/daemon.json 
{
 "insecure-registries": ["http://192.168.1.150:5000","http://192.168.1.150:10000"]
}

f、登录认证

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
docker login 192.168.1.150:10000
Username:zutuanxue
Password:123456

二、 harbor镜像仓库

Harbor离线安装包下载地址:https://github.com/goharbor/harbor

docker-compose版本选择:https://github.com/docker/compose/releases

2.1 harbor下载

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
[root@centos8_manage01 ~]# wget https://storage.googleapis.com/harbor-releases/release-1.9.0/harbor-offline-installer-v1.9.2-rc1.tgz

2.2 docker-compose安装

容器编排工具,执行./install.sh时需要。如果不安装,一会重启docker服务,相关的harbor容器会死掉,安装后就会被随着docker重启

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
curl -L https://github.com/docker/compose/releases/download/1.25.4/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose

2.3 harbor安装

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
[root@centos8_manage01 ~]# tar xf harbor-offline-installer-v1.9.2-rc1.tgz 

[root@centos8_manage01 ~]# mv harbor /opt/
[root@centos8_manage01 ~]# /opt/harbor/prepare 
prepare base dir is set to /opt/harbor
Unable to find image 'goharbor/prepare:v1.9.2' locally
v1.9.2: Pulling from goharbor/prepare
b950b5dd94ab: Pull complete 
cc7bb94ca291: Pull complete 
d6a642502e65: Pull complete 
21510274066b: Pull complete 
04998692a2c0: Pull complete 
ae8f4647fe53: Pull complete 
cee24c721c12: Pull complete 
Digest: sha256:a647780bcd7f5fdcc9696332c9bca90f290912ecb41bd15c4c1a516450597bc2
Status: Downloaded newer image for goharbor/prepare:v1.9.2
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



修改配置文件中的主机名为本机域名或IP
[root@centos8_manage01 ~]# grep "^hostname" /opt/harbor/harbor.yml 
hostname: 192.168.98.240



[root@centos8_manage01 ~]# /opt/harbor/install.sh 

[Step 0]: checking installation environment ...

Note: docker version: 19.03.1
/usr/lib/python2.7/site-packages/requests/__init__.py:91: RequestsDependencyWarning: urllib3 (1.24.3) or chardet (2.2.1) doesn't match a supported version!
  RequestsDependencyWarning)

Note: docker-compose version: 1.24.1

[Step 1]: loading Harbor images ...
6ef530defbe4: Loading layer  63.49MB/63.49MB
55872518448e: Loading layer  54.42MB/54.42MB
070787ce276e: Loading layer  5.632kB/5.632kB
1ddc8ebef7e9: Loading layer  2.048kB/2.048kB
94ec70036213: Loading layer   2.56kB/2.56kB
87f88832870d: Loading layer   2.56kB/2.56kB
208968317bf9: Loading layer   2.56kB/2.56kB
ab6259c81a01: Loading layer  10.24kB/10.24kB
Loaded image: goharbor/harbor-db:v1.9.2
92e51ca4c459: Loading layer  9.005MB/9.005MB
9e12eb4a5a82: Loading layer  3.072kB/3.072kB
913c064dae30: Loading layer  21.76MB/21.76MB
b28cae8255d8: Loading layer  3.072kB/3.072kB
890572f32fd2: Loading layer  8.661MB/8.661MB
6f00be7ade9a: Loading layer  30.42MB/30.42MB
Loaded image: goharbor/harbor-registryctl:v1.9.2
51bada9a03ba: Loading layer  78.25MB/78.25MB
bdd423614a28: Loading layer  3.072kB/3.072kB
e44c809a7328: Loading layer   59.9kB/59.9kB
07d91c85aa68: Loading layer  61.95kB/61.95kB
Loaded image: goharbor/redis-photon:v1.9.2
e0a372c4d5d3: Loading layer  10.84MB/10.84MB
Loaded image: goharbor/nginx-photon:v1.9.2
99f324455426: Loading layer  115.7MB/115.7MB
dbde533bd1f2: Loading layer  12.29MB/12.29MB
32adabde1b24: Loading layer  2.048kB/2.048kB
cdedbb7b738d: Loading layer  48.13kB/48.13kB
60eb6ca8f5f9: Loading layer  3.072kB/3.072kB
05fadada21a7: Loading layer  12.34MB/12.34MB
Loaded image: goharbor/clair-photon:v2.0.9-v1.9.2
fbe05936a49e: Loading layer  12.77MB/12.77MB
8dc691e9365f: Loading layer  55.38MB/55.38MB
c83233ecc176: Loading layer  5.632kB/5.632kB
de775c6f50f5: Loading layer  36.35kB/36.35kB
525709237f01: Loading layer  55.38MB/55.38MB
Loaded image: goharbor/harbor-core:v1.9.2
734abd864add: Loading layer  12.77MB/12.77MB
74033d37bf08: Loading layer  48.13MB/48.13MB
Loaded image: goharbor/harbor-jobservice:v1.9.2
6677f529d41e: Loading layer  9.005MB/9.005MB
019a95ff5e80: Loading layer  3.072kB/3.072kB
4b3792cedc69: Loading layer   2.56kB/2.56kB
274f5851694b: Loading layer  21.76MB/21.76MB
68e937b2af9e: Loading layer  21.76MB/21.76MB
Loaded image: goharbor/registry-photon:v2.7.1-patch-2819-2553-v1.9.2
Loaded image: goharbor/prepare:v1.9.2
0566b1894f2e: Loading layer  9.009MB/9.009MB
b99c86e48679: Loading layer  44.41MB/44.41MB
283ba1db5c52: Loading layer  2.048kB/2.048kB
701de676a8f6: Loading layer  3.072kB/3.072kB
c923d0b0255c: Loading layer  44.41MB/44.41MB
Loaded image: goharbor/chartmuseum-photon:v0.9.0-v1.9.2
ef4a961407c7: Loading layer  9.004MB/9.004MB
7cf94e5011b7: Loading layer  6.239MB/6.239MB
5c984b34ecb2: Loading layer   16.4MB/16.4MB
f06fb877e324: Loading layer  29.21MB/29.21MB
ae07ec384ebd: Loading layer  22.02kB/22.02kB
864698f2b94d: Loading layer  51.85MB/51.85MB
Loaded image: goharbor/notary-server-photon:v0.6.1-v1.9.2
c953b6400a8b: Loading layer   50.3MB/50.3MB
2ee784d17d84: Loading layer  3.584kB/3.584kB
c71f6b26fd01: Loading layer  3.072kB/3.072kB
bb6389098841: Loading layer   2.56kB/2.56kB
b63da553de9f: Loading layer  3.072kB/3.072kB
62a479d14974: Loading layer  3.584kB/3.584kB
aa3fee5917b8: Loading layer  12.29kB/12.29kB
Loaded image: goharbor/harbor-log:v1.9.2
691af8d2c981: Loading layer   14.9MB/14.9MB
7878347ee491: Loading layer  29.21MB/29.21MB
433f16e7c539: Loading layer  22.02kB/22.02kB
ad0202306aed: Loading layer  50.34MB/50.34MB
Loaded image: goharbor/notary-signer-photon:v0.6.1-v1.9.2
62247cb7cb19: Loading layer  337.8MB/337.8MB
d8b748aaf7dd: Loading layer  119.8kB/119.8kB
Loaded image: goharbor/harbor-migrator:v1.9.2
d9705202f79f: Loading layer  7.036MB/7.036MB
3fdb77b47894: Loading layer  196.6kB/196.6kB
8901bb1db41e: Loading layer    172kB/172kB
baf9307d1844: Loading layer  15.36kB/15.36kB
1dcfba9b1bd1: Loading layer  3.584kB/3.584kB
90a90fef2f80: Loading layer  10.84MB/10.84MB
Loaded image: goharbor/harbor-portal:v1.9.2


[Step 2]: preparing environment ...
prepare base dir is set to /opt/harbor
Clearing the configuration file: /config/log/logrotate.conf
Clearing the configuration file: /config/log/rsyslog_docker.conf
Clearing the configuration file: /config/nginx/nginx.conf
Clearing the configuration file: /config/core/env
Clearing the configuration file: /config/core/app.conf
Clearing the configuration file: /config/registry/config.yml
Clearing the configuration file: /config/registryctl/env
Clearing the configuration file: /config/registryctl/config.yml
Clearing the configuration file: /config/db/env
Clearing the configuration file: /config/jobservice/env
Clearing the configuration file: /config/jobservice/config.yml
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

/usr/lib/python2.7/site-packages/requests/__init__.py:91: RequestsDependencyWarning: urllib3 (1.24.3) or chardet (2.2.1) doesn't match a supported version!
  RequestsDependencyWarning)


[Step 3]: starting Harbor ...
/usr/lib/python2.7/site-packages/requests/__init__.py:91: RequestsDependencyWarning: urllib3 (1.24.3) or chardet (2.2.1) doesn't match a supported version!
  RequestsDependencyWarning)
Creating network "harbor_harbor" with the default driver
Creating harbor-log ... done
Creating harbor-portal ... done
Creating redis         ... done
Creating registryctl   ... done
Creating registry      ... done
Creating harbor-db     ... done
Creating harbor-core   ... done
Creating nginx             ... done
Creating harbor-jobservice ... done

✔ ----Harbor has been installed and started successfully.----

Now you should be able to visit the admin portal at http://192.168.98.240. 
For more details, please visit https://github.com/goharbor/harbor .

2.4 docker设置仓库为harbor

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
1、docker服务启动文件
#ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock   注释或者将[-H fd:// --containerd=/run/containerd/containerd.sock]删除
ExecStart=/usr/bin/dockerd         
这样做的目的是让daemon.json管理docker进程

2、创建docker守护进程配置文件
[root@centos8_manage01 harbor]# cat /etc/docker/daemon.json 
{
        "insecure-registries": ["http://192.168.98.240"]
}

2.5 镜像上传到harbor

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
#登陆harbor
[root@centos8_manage01 harbor]# docker login http://192.168.98.240 -u admin -p Harbor12345
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
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


#修改镜像name:tag为harbor仓库名
[root@centos8_manage01 harbor]# docker tag baishuming2020:latest 192.168.98.240/library/centos_web:v1

#上传镜像
[root@centos8_manage01 harbor]# docker push 192.168.98.240/library/centos_web:v1
The push refers to repository [192.168.98.240/library/centos_web]
968786242e9d: Pushed 
v1: digest: sha256:d204253a33c6c2c74273fbd003cf3e14a48bcdd5c7bc10f51ccbad9e4dd39699 size: 528

常见问题

docker-compose命令无法使用 [root@centos8_manage01 ~]# docker-compose ps ERROR: Can’t find a suitable configuration file in this directory or any parent. Are you in the right directory?

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
    Supported filenames: docker-compose.yml, docker-compose.yaml

原因: 当前目录没有配置文件

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
正确执行路径   harbor安装目录
[root@centos8_manage01 harbor]# docker-compose ps 
      Name                     Command                State               Ports          
-----------------------------------------------------------------------------------------
harbor-core         /harbor/harbor_core              Up                                  
harbor-db           /docker-entrypoint.sh            Up         5432/tcp                 
harbor-jobservice   /harbor/harbor_jobservice  ...   Up                                  
harbor-log          /bin/sh -c /usr/local/bin/ ...   Up         127.0.0.1:1514->10514/tcp
harbor-portal       nginx -g daemon off;             Up         8080/tcp                 
nginx               nginx -g daemon off;             Up         0.0.0.0:80->8080/tcp     
redis               redis-server /etc/redis.conf     Up         6379/tcp                 
registry            /entrypoint.sh /etc/regist ...   Up         5000/tcp                 
registryctl         /harbor/start.sh                 Exit 137        
本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
暂无评论
推荐阅读
编辑精选文章
换一批
使用 Harbor 搭建私有 Docker 仓库
本文使用「署名 4.0 国际 (CC BY 4.0)」许可协议,欢迎转载、或重新修改使用,但需要注明来源。 署名 4.0 国际 (CC BY 4.0)
soulteary
2020/05/23
1.1K0
使用 Harbor 搭建私有 Docker 仓库
Harbor仓库搭建
harbor是一个开源镜像仓库,是存储管理私有化docker镜像的工具,这里记录下部署过程以及使用方法
summerking
2022/09/16
4900
Harbor仓库搭建
安装Harbor镜像仓库
小陈运维
2024/11/17
1550
搭建 Harbor v2.2.0 docker私库
上文已经把harbor下载好,接下来需要修改配置文件,我便自己填写了一个yml的配置文件,发现报错了,如下:
嘻哈记
2021/03/23
1.6K0
搭建 Harbor v2.2.0 docker私库
Harbor v2.3.2安装启动报错解决:Creating network “harbor_harbor“ with th..
说明docker网关是关闭的,docker network无法对新的container进行网络配置,重启一下docker就行。
非著名运维
2022/06/22
7230
Harbor v2.3.2安装启动报错解决:Creating network “harbor_harbor“ with th..
手把手带你部署Docker私有镜像仓库Harbor v2.3.2
 Harbor是一个用于存储和分发Docker镜像的企业级Registry服务器,通过添加一些企业必需的功能特性,例如安全、标识和管理等,扩展了开源Docker Distribution。作为一个企业级私有Registry服务器,Harbor提供了更好的性能和安全。提升用户使用Registry构建和运行环境传输镜像的效率。Harbor支持安装在多个Registry节点的镜像资源复制,镜像全部保存在私有Registry中, 确保数据和知识产权在公司内部网络中管控。另外,Harbor也提供了高级的安全特性,诸如用户管理,访问控制和活动审计等。
非著名运维
2022/06/22
1.4K0
手把手带你部署Docker私有镜像仓库Harbor v2.3.2
企业实战(5) Docker私有镜像仓库Harbor的部署与使用详解
 Harbor是一个用于存储和分发Docker镜像的企业级Registry服务器,通过添加一些企业必需的功能特性,例如安全、标识和管理等,扩展了开源Docker Distribution。作为一个企业级私有Registry服务器,Harbor提供了更好的性能和安全。提升用户使用Registry构建和运行环境传输镜像的效率。Harbor支持安装在多个Registry节点的镜像资源复制,镜像全部保存在私有Registry中, 确保数据和知识产权在公司内部网络中管控。另外,Harbor也提供了高级的安全特性,诸如用户管理,访问控制和活动审计等。
非著名运维
2022/06/22
9110
企业实战(5)  Docker私有镜像仓库Harbor的部署与使用详解
基于 Distribution / Harbor 部署 Docker 私有镜像仓库
Docker 在 2015 年推出了 Distribution 项目,即 Docker Registry 2。相比于 Old Registry,Registry 2 使用 Go 实现,在安全性、性能方面均有大幅改进。Registry 设计了全新的 Rest API,并且在 Image 存储格式等方面不再兼容于 Old Registry。如果你要与Registry2 交互,你的 Docker 版本至少要是 Docker 1.6。
iMike
2019/06/02
2.9K0
私有镜像仓库Harbor
Docker守护进程将.crt文件解释为CA证书,将.cert文件解释为客户端证书。 所以需要将服务器转换yourdomain.com.crt为yourdomain.com.cert
仙人技术
2020/04/28
4K0
DockerHub访问慢怎么破?自建个企业级镜像仓库试试!
Harbor是一款开源的Docker镜像仓库服务,在Github上目前有13.4k+Star。提供了基于角色的镜像访问机制,可以保护你的镜像安全。
macrozheng
2020/12/21
1.3K0
DockerHub访问慢怎么破?自建个企业级镜像仓库试试!
Harbor之企业级私有镜像存储仓库入门实践
Harbor 组成 描述: 用于部 署Harbor 的 Docker Compose模板位于 /Deployer/docker-compose.yml,由5个容器组成,这几个容器通过Docker link的形式连接在一起,在容器之间通过容器名字互相访问。
全栈工程师修炼指南
2022/09/29
2.8K0
Harbor之企业级私有镜像存储仓库入门实践
02 . DockerFile构建镜像和Docker仓库
注意: Dockerfile的指令是每执行一次都会在docker上新建一层,所以过多无意义的层,会造成镜像膨胀过大,上面提到过,可以用&&符号链接命令,这样执行后,只会创建一层镜像
iginkgo18
2020/09/27
2.4K0
02 . DockerFile构建镜像和Docker仓库
Harbor仓库部署
Docker容器应用的开发和运行离不开可靠的镜像管理,虽然Docker官方也提供了公共的镜像仓库,但是从安全和效率等方面考虑,部署私有环境内的Registry也是非常必要的。Harbor是由VMware公司开源的企业级的Docker Registry管理项目,它包括权限管理(RBAC)、LDAP、日志审核、管理界面、自我注册、镜像复制和中文支持等功能
行 者
2023/10/20
3190
Harbor介绍与企业级私有Docker镜像仓库搭建
Harbor,是一个英文单词,意思是港湾,港湾是干什么的呢,就是停放货物的,而货物呢,是装在集装箱中的,说到集装箱,就不得不提到Docker容器,因为docker容器的技术正是借鉴了集装箱的原理。所以,Harbor正是一个用于存储Docker镜像的企业级Registry服务。
踏歌行
2020/10/15
2.4K0
Harbor介绍与企业级私有Docker镜像仓库搭建
Docker 私有仓库搭建
在 Docker 中,当我们执行 docker pull xxx 的时候 ,它实际上是从 registry.hub.docker.com 这个地址去查找,这就是Docker公司为我们提供的公共仓库。在工作中,我们不可能把企业项目push到公有仓库进行管理。所以为了更好的管理镜像,Docker不仅提供了一个中央仓库,同时也允许我们搭建本地私有仓库。这一篇介绍registry、harbor两种私有仓库搭建。
程序员果果
2019/05/28
1.9K0
搭建高可用的Harbor
Docker容器应用的开发和运行离不开可靠的镜像管理,Docker官方提供了原生的Registry,但其功能比较简单,而且没有可视化界面,自然无法满足企业级的需求。虽然Docker官方也提供了公共的镜像仓库,但是从安全和效率等方面考虑,部署私有环境内的Registry也是非常必要的。
端碗吹水
2020/09/23
4K0
搭建高可用的Harbor
关于Harbor私有仓库的搭建及使用
关于Harbor私有仓库的搭建及使用
Java架构师必看
2021/06/09
2.6K0
关于Harbor私有仓库的搭建及使用
Harbor 2.2.0 搭建与使用​
Harbor 本地安装支持在线和离线,另外也可以部署到 Kubernetes 中。这里采用本地在线安装方式。
叨叨软件测试
2021/06/16
1.3K0
Harbor 2.2.0 搭建与使用​
关于Docker中 容器镜像管理,数据卷网络,本地仓库,容器监控的一些笔记
学习 K8s,顺便整理下之前学的docker的相关笔记.有错误的地方小伙伴积极留言。
山河已无恙
2023/03/02
2.6K0
关于Docker中 容器镜像管理,数据卷网络,本地仓库,容器监控的一些笔记
这就是你日日夜夜想要的docker!!!---------Harbor私有仓库
是多个容器同时跑起来的服务 所以必须要装docker compose Harbor是VMware公司的开源级的企业级DockerRegistry(仓库)项目,项目地址为 https://github.com/vmware/harbor. Harbor的目标是帮助用户迅速搭建一个企业级的DockerRegistry服务。 Harbor以docker公司开源的registry为基础,提供了管理UI,基于角色的访问控制(Role Based Access Control),AD/LDAP集成,以及审计日志(Auditlogging)等企业用户需求的功能,同时还原生支持中文。 Harbor的每个组件都是以Docker容器的形式构建的,使用docker-compose来对它进行部署。用于部署Harbor的docker-compose模板位于/usr/local/bin/harbor/docker-compose.yml(自定义)
不吃小白菜
2020/09/25
1.4K0
这就是你日日夜夜想要的docker!!!---------Harbor私有仓库
相关推荐
使用 Harbor 搭建私有 Docker 仓库
更多 >
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档
本文部分代码块支持一键运行,欢迎体验
本文部分代码块支持一键运行,欢迎体验