搭建Harbor私有镜像仓库--v1.5.1

Docker Harbor | 私有仓库 | 用户登录 |用户创建 阅读详情

 

1

<em><strong> 搭建Harbor私有镜像仓库--v1.5.1</strong></em>

1、介绍

Docker容器应用的开发和运行离不开可靠的镜像管理,虽然Docker官方也提供了公共的镜像仓库,但是从安全和效率等方面考虑,部署我们私有环境内的Registry也是非常必要的。Harbor是由VMware公司开源的企业级的Docker Registry管理项目,它包括权限管理(RBAC)、LDAP、日志审核、管理界面、自我注册、镜像复制和中文支持等功能。

2、前提准备

确认已安装好docker、docker-compose

复制代码

[root@MyCentos7-1 harbor]# docker version
Client:
 Version:         1.13.1
 API version:     1.26
 Package version: docker-1.13.1-63.git94f4240.el7.centos.x86_64
 Go version:      go1.9.4
 Git commit:      94f4240/1.13.1
 Built:           Fri May 18 15:44:33 2018
 OS/Arch:         linux/amd64

Server:
 Version:         1.13.1
 API version:     1.26 (minimum version 1.12)
 Package version: docker-1.13.1-63.git94f4240.el7.centos.x86_64
 Go version:      go1.9.4
 Git commit:      94f4240/1.13.1
 Built:           Fri May 18 15:44:33 2018
 OS/Arch:         linux/amd64
 Experimental:    false

复制代码

[root@MyCentos7-1 harbor]# docker-compose version
docker-compose version 1.12.0, build b31ff33
docker-py version: 2.2.1
CPython version: 2.7.13
OpenSSL version: OpenSSL 1.0.1t  3 May 2016

3、安装Harbor

3.1下载Harbor安装文件并解压(离线包)

[root@MyCentos7-1 docker]# wget https://storage.googleapis.com/harbor-releases/release-1.5.0/harbor-offline-installe-v1.5.1.tgz
[root@MyCentos7-1 docker]# tar xvf harbor-offline-installer-v1.5.1.tgz

3.2修改配置文件harbor.cfg(红色字体为改动部分)

解压缩之后,目录下回生成harbor.cfg文件,该文件就是Harbor的配置文件

复制代码

[root@MyCentos7-1 harbor]# ll
总用量 856144
drwxr-xr-x. 4 root root        37 6月  11 10:54 common
-rw-r--r--. 1 root root      1185 5月  31 14:45 docker-compose.clair.yml
-rw-r--r--. 1 root root      1725 5月  31 14:45 docker-compose.notary.yml
-rw-r--r--. 1 root root      3596 5月  31 14:45 docker-compose.yml
drwxr-xr-x. 3 root root       156 5月  31 14:45 ha
-rw-r--r--. 1 root root      6683 6月  11 10:51 harbor.cfg
-rw-r--r--. 1 root root 876607879 5月  31 14:46 harbor.v1.5.1.tar.gz
-rwxr-xr-x. 1 root root      5773 5月  31 14:45 install.sh
-rw-r--r--. 1 root root     10771 5月  31 14:45 LICENSE
-rw-r--r--. 1 root root       482 5月  31 14:45 NOTICE
-rwxr-xr-x. 1 root root     27379 5月  31 14:45 prepare

复制代码

复制代码

[root@MyCentos7-1 harbor]# vim harbor.cfg

## Configuration file of Harbor

#This attribute is for migrator to detect the version of the .cfg file, DO NOT MODIFY!
_version = 1.5.0
#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 = MyCentos7-1          ##设置访问地址,可以使用ip、主机名,不可以设置为127.0.0.1或localhost

#The protocol for accessing the UI and token/notification service, by default it is http.
#It can be set to https if ssl is enabled on nginx.
ui_url_protocol = http      ##设置访问协议,默认http,若设为https则nginx ssl需要设置on

#Maximum number of job workers in job service  
max_job_workers = 50 

#Determine whether or not to generate certificate for the registry's token.
#If the value is on, the prepare script creates new root cert and private key 
#for generating token to access the registry. If the value is off the default key/cert will be used.
#This flag also controls the creation of the notary signer's cert.
customize_crt = on

#The path of cert and key files for nginx, they are applied only the protocol is set to https
ssl_cert = /data/cert/server.crt           ##若没有此目录则需要手动建立
ssl_cert_key = /data/cert/server.key

#The path of secretkey storage
secretkey_path = /data

#Admiral's url, comment this attribute, or set its value to NA when Harbor is standalone
admiral_url = NA

#Log files are rotated log_rotate_count times before being removed. If count is 0, old versions are removed rather than rotated.
log_rotate_count = 50
#Log files are rotated only if they grow bigger than log_rotate_size bytes. If size is followed by k, the size is assumed to be in kilobytes. 
#If the M is used, the size is in megabytes, and if G is used, the size is in gigabytes. So size 100, size 100k, size 100M and size 100G 
#are all valid.
log_rotate_size = 200M

#Config http proxy for Clair, e.g. http://my.proxy.com:3128
#Clair doesn't need to connect to harbor ui container via http proxy.
http_proxy =
https_proxy =
no_proxy = 127.0.0.1,localhost,ui

#NOTES: The properties between BEGIN INITIAL PROPERTIES and END INITIAL PROPERTIES
#only take effect in the first boot, the subsequent changes of these properties 
#should be performed on web ui

#************************BEGIN INITIAL PROPERTIES************************

#Email account settings for sending out password resetting emails.

#Email server uses the given username and password to authenticate on TLS connections to host and act as identity.
#Identity left blank to act as username.
email_identity =             ##邮件设置,发送重置密码邮件时使用

email_server = smtp.mydomain.com
email_server_port = 25
email_username = sample_admin@mydomain.com
email_password = abc
email_from = admin <sample_admin@mydomain.com>
email_ssl = false
email_insecure = false

##The initial password of Harbor admin, only works for the first time when Harbor starts. 
#It has no effect after the first launch of Harbor.
#Change the admin password from UI after launching Harbor.
harbor_admin_password = 12345    ##启动Harbor后,管理员UI登录的密码,默认是Harbor12345

##By default the auth mode is db_auth, i.e. the credentials are stored in a local database.
#Set it to ldap_auth if you want to verify a user's credentials against an LDAP server.
auth_mode = db_auth   ##认证方式,这里支持多种认证方式,如LADP、本次存储、数据库认证。默认是db_auth,mysql数据库认证

#The url for an ldap endpoint.  ##LDAP认证时配置项
ldap_url = ldaps://ldap.mydomain.com

#A user's DN who has the permission to search the LDAP/AD server. 
#If your LDAP/AD server does not support anonymous search, you should configure this DN and ldap_search_pwd.
#ldap_searchdn = uid=searchuser,ou=people,dc=mydomain,dc=com

#the password of the ldap_searchdn
#ldap_search_pwd = password

#The base DN from which to look up a user in LDAP/AD
ldap_basedn = ou=people,dc=mydomain,dc=com

#Search filter for LDAP/AD, make sure the syntax of the filter is correct.
#ldap_filter = (objectClass=person)

# The attribute used in a search to match a user, it could be uid, cn, email, sAMAccountName or other attributes depending on your LDAP/AD  
ldap_uid = uid 

#the scope to search for users, 0-LDAP_SCOPE_BASE, 1-LDAP_SCOPE_ONELEVEL, 2-LDAP_SCOPE_SUBTREE
ldap_scope = 2 

#Timeout (in seconds)  when connecting to an LDAP Server. The default value (and most reasonable) is 5 seconds.
ldap_timeout = 5

#Verify certificate from LDAP server
ldap_verify_cert = true

#The base dn from which to lookup a group in LDAP/AD
ldap_group_basedn = ou=group,dc=mydomain,dc=com

#filter to search LDAP/AD group
ldap_group_filter = objectclass=group
#The attribute used to name a LDAP/AD group, it could be cn, name
ldap_group_gid = cn

#The scope to search for ldap groups. 0-LDAP_SCOPE_BASE, 1-LDAP_SCOPE_ONELEVEL, 2-LDAP_SCOPE_SUBTREE
ldap_group_scope = 2

#Turn on or off the self-registration feature
self_registration = on     ##是否开启自注册

#The expiration time (in minute) of token created by token service, default is 30 minutes
token_expiration = 30      ##Token有效时间,默认30分钟

#The flag to control what users have permission to create projects
#The default value "everyone" allows everyone to creates a project. 
#Set to "adminonly" so that only admin user can create project.
project_creation_restriction = everyone     ##用户创建项目权限控制,默认是everyone(所有人),也可以设置为adminonly(只能管理员)

#************************END INITIAL PROPERTIES************************

#######Harbor DB configuration section#######

#The address of the Harbor database. Only need to change when using external db.
db_host = mysql

#The password for the root user of Harbor DB. Change this before any production use.
db_password = root123

#The port of Harbor database host
db_port = 3306

#The user name of Harbor database
db_user = root

##### End of Harbor DB configuration#######

#The redis server address. Only needed in HA installation.
#address:port[,weight,password,db_index]
#redis_url = redis:6379
redis_url = 


##########Clair DB configuration############

#Clair DB host address. Only change it when using an exteral DB.
clair_db_host = postgres

#The password of the Clair's postgres database. Only effective when Harbor is deployed with Clair.
#Please update it before deployment. Subsequent update will cause Clair's API server and Harbor unable to access Clair's database.
clair_db_password = password

#Clair DB connect port
clair_db_port = 5432

#Clair DB username
clair_db_username = postgres

#Clair default database
clair_db = postgres

##########End of Clair DB configuration############

#The following attributes only need to be set when auth mode is uaa_auth
uaa_endpoint = uaa.mydomain.org
uaa_clientid = id
uaa_clientsecret = secret
uaa_verify_cert = true
uaa_ca_cert = /path/to/ca.pem


### Docker Registry setting ###
#registry_storage_provider can be: filesystem, s3, gcs, azure, etc.
registry_storage_provider_name = filesystem
#registry_storage_provider_config is a comma separated "key: value" pairs, e.g. "key1: value, key2: value2".
#Refer to https://docs.docker.com/registry/configuration/#storage for all available configuration.
registry_storage_provider_config =

复制代码

3.3安装并启动

修改完配置文件后,在的当前目录执行./install.sh,Harbor服务就会根据当期目录下的docker-compose.yml开始下载依赖的镜像,检测并按照顺序依次启动各服务

复制代码

[root@MyCentos7-1 harbor]# ./install.sh 

[Step 0]: checking installation environment ...

Note: docker version: 1.13.1

Note: docker-compose version: 1.12.0

[Step 1]: loading Harbor images ...
52ef9064d2e4: Loading layer [==================================================>] 135.9 MB/135.9 MB
4a6862dbadda: Loading layer [==================================================>] 23.25 MB/23.25 MB
58b7d0c522b2: Loading layer [==================================================>]  24.4 MB/24.4 MB
9cd4bb748634: Loading layer [==================================================>] 7.168 kB/7.168 kB
c81302a14908: Loading layer [==================================================>] 10.56 MB/10.56 MB
7848e9ba72a3: Loading layer [==================================================>] 24.39 MB/24.39 MB
Loaded image: vmware/harbor-ui:v1.5.1
f1691b5a5198: Loading layer [==================================================>] 73.15 MB/73.15 MB
a529013c99e4: Loading layer [==================================================>] 3.584 kB/3.584 kB
d9b4853cff8b: Loading layer [==================================================>] 3.072 kB/3.072 kB
3d305073979e: Loading layer [==================================================>] 4.096 kB/4.096 kB
c9e17074f54a: Loading layer [==================================================>] 3.584 kB/3.584 kB
956055840e30: Loading layer [==================================================>] 9.728 kB/9.728 kB
Loaded image: vmware/harbor-log:v1.5.1
185db06a02d0: Loading layer [==================================================>] 23.25 MB/23.25 MB
835213979c70: Loading layer [==================================================>]  20.9 MB/20.9 MB
f74eeb41c1c9: Loading layer [==================================================>]  20.9 MB/20.9 MB
Loaded image: vmware/harbor-jobservice:v1.5.1
9bd5c7468774: Loading layer [==================================================>] 23.25 MB/23.25 MB
5fa6889b9a6d: Loading layer [==================================================>]  2.56 kB/2.56 kB
bd3ac235b209: Loading layer [==================================================>]  2.56 kB/2.56 kB
cb5d493833cc: Loading layer [==================================================>] 2.048 kB/2.048 kB
557669a074de: Loading layer [==================================================>]  22.8 MB/22.8 MB
f02b4f30a9ac: Loading layer [==================================================>]  22.8 MB/22.8 MB
Loaded image: vmware/registry-photon:v2.6.2-v1.5.1
5d3b562db23e: Loading layer [==================================================>] 23.25 MB/23.25 MB
8edca1b0e3b0: Loading layer [==================================================>] 12.16 MB/12.16 MB
ce5f11ea46c0: Loading layer [==================================================>]  17.3 MB/17.3 MB
93750d7ec363: Loading layer [==================================================>] 15.87 kB/15.87 kB
36f81937e80d: Loading layer [==================================================>] 3.072 kB/3.072 kB
37e5df92b624: Loading layer [==================================================>] 29.46 MB/29.46 MB
Loaded image: vmware/notary-server-photon:v0.5.1-v1.5.1
0a2f8f90bd3a: Loading layer [==================================================>] 401.3 MB/401.3 MB
41fca4deb6bf: Loading layer [==================================================>] 9.216 kB/9.216 kB
f2e28262e760: Loading layer [==================================================>] 9.216 kB/9.216 kB
68677196e356: Loading layer [==================================================>]  7.68 kB/7.68 kB
2b006714574e: Loading layer [==================================================>] 1.536 kB/1.536 kB
Loaded image: vmware/mariadb-photon:v1.5.1
a8c4992c632e: Loading layer [==================================================>] 156.3 MB/156.3 MB
0f37bf842677: Loading layer [==================================================>] 10.75 MB/10.75 MB
9f34c0cd38bf: Loading layer [==================================================>] 2.048 kB/2.048 kB
91ca17ca7e16: Loading layer [==================================================>] 48.13 kB/48.13 kB
5a7e0da65127: Loading layer [==================================================>]  10.8 MB/10.8 MB
Loaded image: vmware/clair-photon:v2.0.1-v1.5.1
0e782fe069e7: Loading layer [==================================================>] 23.25 MB/23.25 MB
67fc1e2f7009: Loading layer [==================================================>] 15.36 MB/15.36 MB
8db2141aa82c: Loading layer [==================================================>] 15.36 MB/15.36 MB
Loaded image: vmware/harbor-adminserver:v1.5.1
3f87a34f553c: Loading layer [==================================================>] 4.772 MB/4.772 MB
Loaded image: vmware/nginx-photon:v1.5.1
Loaded image: vmware/photon:1.0
ad58f3ddcb1b: Loading layer [==================================================>] 10.95 MB/10.95 MB
9b50f12509bf: Loading layer [==================================================>]  17.3 MB/17.3 MB
2c21090fd212: Loading layer [==================================================>] 15.87 kB/15.87 kB
38bec864f23e: Loading layer [==================================================>] 3.072 kB/3.072 kB
6e81ea7b0fa6: Loading layer [==================================================>] 28.24 MB/28.24 MB
Loaded image: vmware/notary-signer-photon:v0.5.1-v1.5.1
897a26fa09cb: Loading layer [==================================================>] 95.02 MB/95.02 MB
16e3a10a21ba: Loading layer [==================================================>] 6.656 kB/6.656 kB
85ecac164331: Loading layer [==================================================>] 2.048 kB/2.048 kB
37a2fb188706: Loading layer [==================================================>]  7.68 kB/7.68 kB
Loaded image: vmware/postgresql-photon:v1.5.1
bed9f52be1d1: Loading layer [==================================================>] 11.78 kB/11.78 kB
d731f2986f6e: Loading layer [==================================================>]  2.56 kB/2.56 kB
c3fde9a69f96: Loading layer [==================================================>] 3.072 kB/3.072 kB
Loaded image: vmware/harbor-db:v1.5.1
7844feb13ef3: Loading layer [==================================================>] 78.68 MB/78.68 MB
de0fd8aae388: Loading layer [==================================================>] 3.072 kB/3.072 kB
3f79efb720fd: Loading layer [==================================================>]  59.9 kB/59.9 kB
1c02f801c2e8: Loading layer [==================================================>] 61.95 kB/61.95 kB
Loaded image: vmware/redis-photon:v1.5.1
454c81edbd3b: Loading layer [==================================================>] 135.2 MB/135.2 MB
e99db1275091: Loading layer [==================================================>] 395.4 MB/395.4 MB
051e4ee23882: Loading layer [==================================================>] 9.216 kB/9.216 kB
6cca4437b6f6: Loading layer [==================================================>] 9.216 kB/9.216 kB
1d48fc08c8bc: Loading layer [==================================================>]  7.68 kB/7.68 kB
0419724fd942: Loading layer [==================================================>] 1.536 kB/1.536 kB
543c0c1ee18d: Loading layer [==================================================>] 655.2 MB/655.2 MB
4190aa7e89b8: Loading layer [==================================================>] 103.9 kB/103.9 kB
Loaded image: vmware/harbor-migrator:v1.5.0


[Step 2]: preparing environment ...
Generated and saved secret to file: /data/secretkey
Generated configuration file: ./common/config/nginx/nginx.conf
Generated configuration file: ./common/config/adminserver/env
Generated configuration file: ./common/config/ui/env
Generated configuration file: ./common/config/registry/config.yml
Generated configuration file: ./common/config/db/env
Generated configuration file: ./common/config/jobservice/env
Generated configuration file: ./common/config/jobservice/config.yml
Generated configuration file: ./common/config/log/logrotate.conf
Generated configuration file: ./common/config/jobservice/config.yml
Generated configuration file: ./common/config/ui/app.conf
Generated certificate, key file: ./common/config/ui/private_key.pem, cert file: ./common/config/registry/root.crt
The configuration files are ready, please use docker-compose to start the service.


[Step 3]: checking existing instance of Harbor ...


[Step 4]: starting Harbor ...
Creating network "harbor_harbor" with the default driver
Creating harbor-log
Creating harbor-adminserver
Creating redis
Creating harbor-db
Creating registry
Creating harbor-ui
Creating nginx
Creating harbor-jobservice

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

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

复制代码

4、访问Harbor

启动完成后,我们访问刚设置的hostname即可 http://MyCentos7-1,默认是80端口,如果端口占用,我们可以去修改docker-compose.yml文件中,对应服务的端口映射。windos,hosts文件地址:C:\Windows\System32\drivers\etc,将域名与ip添加进去即可。 (或直接访问harbor所在物理机地址:http://192.168.126.131:80)

输入用户名admin,默认密码(或已修改密码)登录系统

 

我们可以看到系统各个模块如下:

  • 项目:新增/删除项目,查看镜像仓库,给项目添加成员、查看操作日志、复制项目等
  • 日志:仓库各个镜像create、push、pull等操作日志
  • 系统管理 
    • 用户管理:新增/删除用户、设置管理员等
    • 复制管理:新增/删除从库目标、新建/删除/启停复制规则等
    • 配置管理:认证模式、复制、邮箱设置、系统设置等
  • 其他设置 
    • 用户设置:修改用户名、邮箱、名称信息
    • 修改密码:修改用户密码

注意:非系统管理员用户登录,只能看到有权限的项目和日志,其他模块不可见。

 

  • 新建项目

我们新建一个名称为wanyang的项目,设置不公开。注意:当项目设为公开后,任何人都有此项目下镜像的读权限。命令行用户不需要“docker login”就可以拉取此项目下的镜像。 

 

新建项目完毕后,我们就可以用admin账户提交本地镜像到Harbor仓库了。例如我们提交本地nginx镜像

复制代码

1、admin登录
$ docker login mycentos7-1
Username: admin
Password:
Login Succeeded

2、给镜像打tag【tag 修改 image 的名字. 格式为: userip/项目名/image名字:版本号】
$ docker tag nginx 192.168.126.131/docker/nginx:latest
$ docker images
REPOSITORY                         TAG                 IMAGE ID            CREATED             SIZE
nginx                              latest              958a7ae9e569        2 weeks ago         109 MB
mycentos7-1/docker/nginx         latest                958a7ae9e569        2 weeks ago         109 MB

3、push到仓库
$ docker push mycentos7-1/docker/nginx
The push refers to a repository [docker.bksx.com/docker/nginx]
a552ca691e49: Pushed
7487bf0353a7: Pushed
8781ec54ba04: Pushed
latest: digest: sha256:41ad9967ea448d7c2b203c699b429abe1ed5af331cd92533900c6d77490e0268 size: 948

复制代码

 上传完毕后,登录Web Harbor,选择项目,项目名称docker,就可以查看刚才上传的nginx image了



  • FAQ
  • 配置并启动Harbor之后,本地执行登录操作,报错:
docker login mycentos7-1
Username: admin
Password:
Error response from daemon: Get https://mycentos7-1/v2/users/: dial tcp 192.168.126.131:443: getsockopt: connection refused

这是因为docker1.3.2版本开始默认docker registry使用的是https,我们设置Harbor默认http方式,所以当执行用docker login、pull、push等命令操作非https的docker regsitry的时就会报错。解决办法:

    • 如果系统是MacOS,则可以点击“Preference”里面的“Advanced”在“Insecure 
      Registry”里加上mycentos7-1,重启Docker客户端就可以了。
    • 如果系统是Ubuntu,则修改配置文件/lib/systemd/system/docker.service,修改[Service]下ExecStart参数,增加– insecure-registry=mycentos7-1。
    • 如果系统是Centos,可以修改配置/etc/sysconfig/docker,将OPTIONS增加 --insecure-registry=mycentos7-1。
OPTIONS='--selinux-enabled --log-driver=journald --signature-verification=false --insecure-registry=mycentos7-1'
    • 如果是新版本的docker在/etc/sysconfig/ 没有docker这个配置文件的情况下。

复制代码

#在daemon.json中添加以下参数
[root@MyCentos7-1 harbor]# cat /etc/docker/daemon.json 
{
  "insecure-registries": [
    "mycentos7-1"
  ]
}

复制代码

注意:该文件必须符合 json 规范,否则 Docker 将不能启动。


 

如果需要修改Harbor的配置文件harbor.cfg,因为Harbor是基于docker-compose服务编排的,我们可以使用docker-compose命令重启Harbor。不修改配置文件,重启Harbor命令:docker-compose start | stop | restart

注:需要在harbor安装目录所在文件夹下执行,否则会报错

复制代码

[root@MyCentos7-1 ~]# docker-compose up -d
ERROR: 
        Can't find a suitable configuration file in this directory or any
        parent. Are you in the right directory?

        Supported filenames: docker-compose.yml, docker-compose.yaml

[root@MyCentos7-1 ~]# cd /service/docker/harbor/

[root@MyCentos7-1 harbor]# ll
总用量 856144
drwxr-xr-x. 4 root root 37 6月 11 10:54 common
-rw-r--r--. 1 root root 1185 5月 31 14:45 docker-compose.clair.yml
-rw-r--r--. 1 root root 1725 5月 31 14:45 docker-compose.notary.yml
-rw-r--r--. 1 root root 3596 5月 31 14:45 docker-compose.yml
drwxr-xr-x. 3 root root 156 5月 31 14:45 ha
-rw-r--r--. 1 root root 6687 6月 11 18:47 harbor.cfg
-rw-r--r--. 1 root root 6687 6月 11 10:24 harbor.cfg.bak
-rw-r--r--. 1 root root 876607879 5月 31 14:46 harbor.v1.5.1.tar.gz
-rwxr-xr-x. 1 root root 5773 5月 31 14:45 install.sh
-rw-r--r--. 1 root root 10771 5月 31 14:45 LICENSE
-rw-r--r--. 1 root root 482 5月 31 14:45 NOTICE
-rwxr-xr-x. 1 root root 27379 5月 31 14:45 prepare

故应该在/service/docker/harbor目录下执行。

复制代码

复制代码

1、停止Harbor
$ docker-compose down -v
Stopping nginx ... done
Stopping harbor-jobservice ... done
......
Removing harbor-log ... done
Removing network harbor_harbor

2、启动Harbor
$ docker-compose up -d
Creating network "harbor_harbor" with the default driver
Creating harbor-log ... 
......
Creating nginx
Creating harbor-jobservice ... done

复制代码

 

参考:https://blog.youkuaiyun.com/weixin_41465338/article/details/80146218

 

分类: K8S+Docker

好文要顶 关注我 收藏该文  

山人是我师
关注 - 1
粉丝 - 1

+加关注

0

0

« 上一篇:安装配置heapster(包含influxdb,grafana)
» 下一篇:Influxdb配置文件详解---influxdb.conf

centos7搭建harbor镜像仓库 一、环境依赖 Python 2.7或以上 Docker 1.10或以上 Docker Compose 1.6.0或以上 二、安装过程:(centos7 自带Python 2.7,并我自己安装了docker 1.13)1、安装pipwget --no-check-certificate https://pypi.python.org/packages/source/s/setuptools/set 阅读详情

相关推荐

Harbor私有镜像仓库的搭建与镜像上传拉取操作

使用独立主机部署harbor使用docker compose 完成harbor部署后期使用harbor 中的镜像来部署应用。

qq_42853133的博客 1774

深入解析Linux零拷贝技术:从DMA到sendfile的高效数据传输实践

本文深入解析Linux零拷贝技术,从DMA基础到sendfile高效数据传输实践,详细介绍了如何通过mmap、sendfile和scatter/gather DMA等技术减少数据拷贝次数,显著提升文件传输性能。适用于高并发文件服务器、视频流处理等场景,帮助开发者优化系统性能。

weixin_30399155的博客 912

手把手教你搭建Harbor镜像仓库

在使用docker进行部署的时候,我们需要有个仓库来对我们的自己封装的镜像文件进行管理,之前我是一直使用的是阿里云提供仓库,这个是免费的,也是挺好用的,但对仓库的数量是有限制的,无法进行企业化的管理,所以这里我们采用Harbor搭建一个属于自己的docker的镜像管理仓库。Harbor是由VMware公司开源的企业级的Docker Registry管理项目,它包括权限管理(RBAC)、LDAP、日志审核、管理界面、自我注册、镜像复制和中文支持等功能,具有web管理功能,操作其实是非常简单易行的。...

叶青 5566

Harbor.cfg 配置文件参数详解

Harbor.cfg 配置文件参数详解

共产主义接班人 949

Harbor 私有镜像仓库搭建

格式:docker tag 本地镜像名:版本 Harbor服务器访问ip+端口/test/仓库镜像名:版本。# 其他服务器登入镜像仓库,默认管理员用户名:admin 密码:Harbor12345。# 默认管理员用户名:xxxx 密码:xxxx,具体查看 harbor.yml 配置。# 详细登入方式:docker login -u 用户 -p 密码 服务器IP:端口。# 1、生成证书,并保存到 /home/harbor/certs 目录下。# 默认管理员用户名:xxxx 密码:xxxxxx。

qq_41126822的博客 891

使用 Docker 搭建 Harbor 镜像仓库并进行操作

通过上述步骤,你可以成功搭建一个 Harbor 镜像仓库并进行相关操作。Harbor 提供了功能强大的镜像管理和安全控制,能够满足企业级应用的需求。希望本文能够帮助你顺利搭建并使用 Harbor 镜像仓库。

只有做与不做 没有想与不想 1438

docker-harbor私有仓库的部署与管理

本章主要讲解了docker-harbor私有仓库的介绍与部署以及维护

weixin_53585291的博客 1630

docker -私有镜像仓库 - harbor安装

镜像仓库作用:存储镜像,可以通过镜像仓库实现镜像的共享镜像仓库的使用流程:镜像仓库分类:1、公有镜像仓库:可以理解成云仓库、公有仓库,是由某个组织、公司维护的仓库,对互联网开放,所有人共享。如官方的仓库docker hub。2、私有镜像仓库:不对外开放。一般情况下只在公司内网中使用,用于加快镜像拉取速度、维护公司资产。私有镜像仓库种类:Registry是Docker自带的镜像仓库,部署运行非常简洁,非常适合在测试时使用。Harbor。

小丁的博客 1941

私有镜像仓库Harbor-v1.5.0搭建与使用

环境准备 安装docker-ce(过程省略) 安装docker-compose(过程省略) 安装harbor 下载Harbor离线安装包 下载地址:http://harbor.orientsoft.cn/,找个最新的,本文使用v1.5.0版本 使用 tar xvf harbor-offline-installer-v1.5.0.tgz 进入到解压后的目录,harbor/ 配置...

Happywzy~的博客 851

Matlab之fdesign的应用说明

fdesign 是 MATLAB 中用于数字滤波器设计的工具(属于),它提供了一种系统化的方式来定义滤波器参数并生成相应的滤波器。指定滤波器的频率、幅度等参数。例如,设计一个低通滤波器:Fs = 1000;% 采样率 (Hz)% 通带截止频率% 阻带截止频率Apass = 1;% 通带衰减 (dB)Astop = 60;% 阻带衰减 (dB)

嵌入式老牛的博客 1054

Windows音效增强设置详解:从系统开关到专业EQ调音

声音信号在Windows系统中需要经过混音器、声卡驱动与APO效果器等多层处理链路,最终才到达耳机或音箱。系统自带的响度均衡、低音增强、虚拟环绕等音频增强选项,本质上是对动态范围和频响的干预,理解其原理才能避免盲目开启导致声音发闷或失真。空间音效与采样率的正确配置,可减少SRC重采样带来的音质损失,而Win11的音频增强开关和通信设置也常被忽视。无论是板载声卡还是USB解码耳放,合理利用系统增强和Equalizer APO等工具,都能显著改善听感体验。本文结合场景给出设置建议,帮助用户告别声音浑浊,获得干净

weixin_31155097的博客 409

学习使用VMware harbor搭建docker镜像仓库

离线安装过程:root@Ubuntu-001:~/harbor# ./install.sh [Step 0]: checking installation environment ... Note: docker version: 17.12.0 Note: docker-compose version: 1.19.0 [Step 1]: loading Harbor images .....

Coding家园! 4642

狗都能看懂的MAML原理讲解和代码实现

meta-leaning指的是元学习,元学习是深度学习的一个分支,一个好的元模型(meta-learner)应该具备对新的、少量的数据做出快速而准确的学习。通俗的来讲, 对于人来说,给几张橘猫的图片让看一下,再给你几张没见过的英短猫图片,你一定能很快识别出来都是猫。但是对于神经网络来说,并非如此。如果让一个小汽车分类网络去识别不同的大货车,那效果肯定很差。而传统的CNN网络都是输入大量的数据,然后进行分类的学习。但是这样做的问题就是,神经网络的通用性太差了,根本达不到“智能”的标准。而人类的认知系统,可以通

个人学习笔记 6万+

【信创-k8s】银河麒麟V11离线环境超简单部署k8s1.34.5+KubeSphere3.4.1

Kylin V11于2025年9月经过安可测试,进入国家信创目录。本文演示以Kylin-V11刚装完系统离线环境下,all in one部署k8s 1.34.5+ks3.4.1。

qq_33174891的博客 802

[UVM]UVM TLM2.0简介及应用实例分析

本文介绍了TLM2.0在UVM中的实现与应用。TLM2.0作为SystemC模型间的核心传输机制,相比TLM1.0提供了更丰富的特性,包括双向阻塞/非阻塞接口、时间标记和统一数据包。文章详细解析了TLM2.0在UVM中的接口实现方式,包括socket类型定义、数据传输机制以及时间标记处理。通过一个具体实例,展示了如何在UVM组件中使用TLM2.0的initiator和target socket进行数据传输,并说明了标准数据包格式和精确时间标记的优势。最后指出TLM2.0在UVM中的实现主要是为了与Syste

元直的博客 5398

嵌入式Zephyr RTOS面试题及参考答案

在Zephyr中,为自定义外设编写Devicetree绑定(Bindings)有助于内核理解设备树中自定义外设节点的含义和属性。首先,需要创建一个.yaml格式的绑定文件,通常存放在目录下对应的子目录中,文件名应能反映外设的类型和功能。绑定文件的开头要定义基本信息,包括字段,用于简要描述外设的功能和用途;compatible字段,它是一个字符串列表,用于匹配设备树中自定义外设节点的compatible属性,设备树节点和绑定文件通过这个字段关联起来。接下来,要定义外设节点的属性。使用properties。

大模型大数据攻城狮的专栏 988

【信创-k8s】麒麟V11使用containerd2.1.5全离线安装k8s1.32.11+KubeSphere

本文以麒麟V11,使用离线部署节点。

qq_33174891的博客 814

最详细的 SAP ABAP Web Service 创建和消费步骤讲解

本文原版发表于 SAP 官方社区,当时用的英文版写作,标题为:Step by step to create, consume and trace web service in ABAP system https://blogs.sap.com/2014/05/20/step-by-step-to-create-consume-and-trace-web-service-in-abap-system/ 总共阅读量超过 18 万。 How to create web service provider in A

2007 年 ~ 2025 年,深耕 SAP 技术 18 年 3154

kubernetes(k8s)+harbor本地仓库的集群部署及ansibel批量工具的利用

本文主要介绍如何部署一个 Kubernetes(k8s)集群,包含一个本地 Harbor 私有镜像仓库,采用一主两从的集群架构,并使用 Ansible 工具进行批量自动化部署。

xiaolin_ss的博客 256

windows中搭建sonic云真机环境/云真机环境搭建-基于docker容器部署

基于Windows系统搭建Sonic远程云真机环境实现通过浏览器操作手机端系统

雾林小妖的博客 1019

【毕设级教程】从0到1实现基于YOLOv8的xView卫星图像目标检测系统(含UI界面,助力遥感智能毕设)

本文基于YOLOv8模型设计了一个面向xView卫星图像的目标检测系统。首先对xView数据集进行了格式转换处理,将原始多边形标注转换为YOLO格式的边界框标注。随后通过配置YOLOv8模型参数完成训练,实现了对卫星图像中建筑、车辆等多类目标的准确识别。为提高系统交互性,采用PyQt开发了可视化界面,支持图像选择、实时检测和结果展示功能。整个系统兼顾学术价值和实用价值,为遥感领域的自动化目标检测提供了可行方案。

m0_64661770的博客 131

Linux中基于Docker搭建harbor私有镜像仓库(超级详细)

文章目录前言Harbor仓库介绍Harbor仓库结构安装docker启动docker和设置开机自启搭建harbor镜像仓库 前言 Docker容器应用的开发和运行离不开可靠的镜像管理,虽然Docker官方也提供了公共的镜像仓库,但是从安全和效率等方面考虑,部署我们私有环境内的Registry也是非常必要的。 Harbor仓库介绍 我们在日常Docker容器使用和管理过程中,渐渐发现部署企业私有仓库往往是很有必要的, 它可以帮助你管理企业的一些敏感镜像, 同时由于Docker Hub的下载速度和GFW的原

liu_chen_yang的博客 5771

android 蓝牙通讯demo

android 下蓝牙通讯demo,实现了发现蓝牙,使能蓝牙,通过蓝牙发送消息。

docker-compose;私有镜像仓库harbor搭建;镜像推送到私有仓库harbor

Docker Compose是一个用于定义和运行多容器Docker应用程序的工具。它允许你通过一个单独的YAML文件来定义应用程序的服务、网络和卷等配置,然后使用简单的命令来创建和管理这些容器。 Harbor是一个开源的企业级Docker仓库,提供了一个安全可靠的容器镜像存储和分发解决方案。

weixin_44681307的博客 1921

蓝牙模块HM-10手册

蓝牙模块HM-10手册,该手册对蓝牙模块HM-10进行了详细的介绍和使用方法以及一些AT指令。

Devexpress16.2.6破解工具

Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具

harbor私有镜像仓库手把手搭建

按照本文安装首先需要准备好docker环境。如果没有参考:https://blog.csdn.net/qq_45827611/article/details/135926930?harbor私有镜像仓库,用于存储容器镜像,在项目自动化测试项目中,可以保存各个版本的自动化脚本镜像,结合Jenkins流水线项目可进行封装、推送、运行、销毁、删除、并在harbor中保留每次运行的脚本容器镜像。harbor本身设计就是需要运行在docker中的,所以需要事先准备好docker环境。

qq_45827611的博客 1998

复分析 阿尔福斯(Ahlfors) 第三版答案 英文

答案分为十章,有部分习题没有答案,全英文复分析阿尔福斯(Ahlfors) 第三版答案

harbor私有镜像仓库,搭建及管理

3. 用跳板机把harbor软件包传给harbor主机,harbor是一个绿色软件,不用安装,解压就可以用,比如解压到/usr/local/目录下。1. 给harbor主机安装docker环境,因为harbor是以docker-compose的方式部署的。docker可以把仓库的镜像下载到本地,也可以直接用私有仓库的镜像启动容器。云服务商的镜像加速器,就是云服务商做的私有镜像仓库,供云服务商的用户使用。做个仓库,把镜像放里头,用什么服务,起什么容器。(证书,自己做的需要,授权机构认证的不需要)

2401_84019227的博客 1462
上一篇: redis集群密码设置
下一篇: docker: 镜像的保存,载入,和删除方法
王树民
博客等级 码龄10年 912粉丝 560原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值