Centos7安装docker镜像私服harbor

Centos7安装docker镜像私服harbor

docker只要安装稳定版本就可以

配置阿里云的加速镜像

{

"registry-mirrors":[

"https://xxxxx.mirror.aliyuncs.com",”http://f2d6cb40.m.daocloud.io”]

,

"insecure-registries":[

"privatecloud.docker.domain","privatecloud.docker.domain:5000"

]

}

1、安装docker-compose

curl -L https://github.com/docker/compose/releases/download/1.14.0/docker-compose-uname-s-uname -m > /usr/local/bin/docker-compose

chmod +x /usr/local/bin/docker-compose

2、下载harbor

wget https://github.com/vmware/harbor/releases/download/v1.1.2/harbor-online-installer-v1.1.2.tgz

tar xvf harbor-online-installer-v1.1.2.tgz

之后修改配置文件harbor.cfg

配置文件参数说明:

# hostname 设置访问地址,支持IP,域名,主机名,禁止设置127.0.0.1

hostname = reg.mydomain.com

# 访问协议,可设置 http,https

ui_url_protocol = http

# 邮件通知, 配置邮件通知。

email_server = smtp.mydomain.com

email_server_port = 25

email_username = [email protected]

email_password = abc

email_from = admin [email protected]

email_ssl = false

# harbor WEB UI登陆使用的密码

harbor_admin_password = Harbor12345

# 认证方式,这里支持多种认证方式,默认是 db_auth ,既mysql数据库存储认证。

# 这里还支持 ldap 以及 本地文件存储方式。

auth_mode = db_auth

# ldap 服务器访问地址。

ldap_url = ldaps://ldap.mydomain.com 

ldap_basedn = uid=%s,ou=people,dc=mydomain,dc=com

# mysql root 账户的 密码

db_password = root123 

self_registration = on 

use_compressed_js = on 

max_job_workers = 3 

verify_remote_cert = on 

customize_crt = on

# 一些显示的设置.

crt_country = CN

crt_state = State

crt_location = CN

crt_organization = organization

crt_organizationalunit = organizational unit

crt_commonname = example.com

crt_email = [email protected]

3、安装

./prepare

docker-compose up -d

你可能感兴趣的:(docker)