Docker 개인 창고 Harbor v1.6.1 설치
: CentOS 7.5.1804
: 4.18.7-1.el7.elrepo.x86_64
Docker-ce 18.09
docker-compose 1.23.1
Harbor v1.6.1
Harbor IP:192.168.1.3
Docker HTTPS 。
, 。
!!! SELINUX!!!
# Docker
wget -O /etc/yum.repos.d/docker-ce.repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
yum install -y docker-ce
mkdir /etc/docker/
cat << EOF > /etc/docker/daemon.json
{ "registry-mirrors": ["https://registry.docker-cn.com"],
"live-restore": true,
"default-shm-size": "128M",
"max-concurrent-downloads": 10,
"oom-score-adjust": -1000,
"debug": false
}
EOF
#
cat < /etc/sysctl.d/docker.conf
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
EOF
sysctl --system
# docker-compose
yum install -y python-pip
pip install docker-compose
systemctl daemon-reload
systemctl enable docker
systemctl restart docker
###############################################
[root@harbor ~]# docker -v
Docker version 18.09.0, build 4d60db4
[root@harbor ~]# docker-compose -v
docker-compose version 1.23.1, build b02f130
# :https://github.com/goharbor/harbor/releases
# online ,
cd $HOME
wget https://storage.googleapis.com/harbor-releases/harbor-online-installer-v1.6.1.tgz
#
tar -xf harbor-online-installer-v1.6.1.tgz
cd harbor
[root@harbor ~]# cd harbor/
[root@harbor harbor]# ll
total 1588
drwxr-xr-x 3 root root 23 Nov 13 15:03 common
-rw-r--r-- 1 root root 727 Nov 9 13:59 docker-compose.chartmuseum.yml
-rw-r--r-- 1 root root 777 Nov 9 13:59 docker-compose.clair.yml
-rw-r--r-- 1 root root 1258 Nov 9 13:59 docker-compose.notary.yml
-rw-r--r-- 1 root root 3589 Nov 9 13:59 docker-compose.yml
drwxr-xr-x 3 root root 136 Nov 9 13:59 ha
-rw-r--r-- 1 root root 7913 Nov 9 13:59 harbor.cfg
-rwxr-xr-x 1 root root 6162 Nov 9 13:59 install.sh
-rw-r--r-- 1 root root 10768 Nov 9 13:59 LICENSE
-rw-r--r-- 1 root root 482 Nov 9 13:59 NOTICE
-rw-r--r-- 1 root root 1535603 Nov 9 13:59 open_source_license
-rwxr-xr-x 1 root root 39496 Nov 9 13:59 prepare
#######################################################
harbor.cfg # harbor
install.sh #
docker-compose.yml #docker-compose
# :https://github.com/goharbor/harbor/blob/master/docs/installation_guide.md#configuring-harbor
# :
#hostname , ip、 , 127.0.0.1 localhost
hostname = registry.lotbrick.com
# , http, https
# HTTPS, ssl , docker ssl ,
# HTTP, daemon.json :insecure-registries , docker http
ui_url_protocol = https
# Harbor , UI , Harbor12345
harbor_admin_password = Harbor12345
#
max_job_workers = 3
#SSL , https ,
ssl_cert = /data/cert/server.crt
ssl_cert_key = /data/cert/server.key
# , :
secretkey_path = /data
# ,
email_identity =
email_server = smtp.mydomain.com
email_server_port = 25
email_username = [email protected]
email_password = abc
email_from = admin
email_ssl = false
# , , LADP、 、 。 db_auth,mysql
auth_mode = db_auth
#
self_registration = on
#Token , 30
token_expiration = 30
# , everyone( ), adminonly( )
project_creation_restriction = everyone
# /data/cert
mkdir -pv /data/cert
####################################################################
[root@harbor cert]# pwd
/data/cert
[root@harbor cert]# ll
total 8
-rw-r--r-- 1 root root 3575 Nov 10 14:43 server.crt
-rw-r--r-- 1 root root 1675 Nov 10 14:43 server.key
[root@harbor cert]#
# install.sh
cd $HOME/harbor
docker-compose pull
./install.sh
docker ps -a
# harbor , up
[root@harbor harbor]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
1949a6ca748c goharbor/harbor-jobservice:v1.6.1 "/harbor/start.sh" About a minute ago Up About a minute harbor-jobservice
162f83595512 goharbor/nginx-photon:v1.6.1 "nginx -g 'daemon of…" About a minute ago Up About a minute (healthy) 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp, 0.0.0.0:4443->4443/tcp nginx
46049917eebc goharbor/harbor-ui:v1.6.1 "/harbor/start.sh" About a minute ago Up About a minute (healthy) harbor-ui
d53e5cf18b05 goharbor/redis-photon:v1.6.1 "docker-entrypoint.s…" 2 minutes ago Up About a minute 6379/tcp redis
7f33cfd0d7ee goharbor/harbor-adminserver:v1.6.1 "/harbor/start.sh" 2 minutes ago Up About a minute (healthy) harbor-adminserver
585f5fd7886d goharbor/registry-photon:v2.6.2-v1.6.1 "/entrypoint.sh /etc…" 2 minutes ago Up About a minute (healthy) 5000/tcp registry
7f6f7925306d goharbor/harbor-db:v1.6.1 "/entrypoint.sh post…" 2 minutes ago Up About a minute (healthy) 5432/tcp harbor-db
927fd00420fe goharbor/harbor-log:v1.6.1 "/bin/sh -c /usr/loc…" 2 minutes ago Up About a minute (healthy) 127.0.0.1:1514->10514/tcp harbor-log
[root@harbor harbor]#
# windows hosts , registry.lotbrick.com harbor IP
#
# :admin, :Harbor12345
# test
# harbor hosts, harbor
cat << EOF >> /etc/hosts
192.168.1.3 registry.lotbrick.com
EOF
#pull alpine
docker pull alpine
docker images
# alpine tag
# : / / :
docker tag alpine:latest registry.lotbrick.com/test/alpine:latest
#
docker login registry.lotbrick.com
docker push registry.lotbrick.com/test/alpine:latest
# web ,
# , hosts
cat << EOF >> /etc/hosts
192.168.1.3 registry.lotbrick.com
EOF
# pull
docker pull registry.lotbrick.com/test/alpine:latest
전재 대상:https://blog.51cto.com/bigboss/2316525
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
다양한 언어의 JSONJSON은 Javascript 표기법을 사용하여 데이터 구조를 레이아웃하는 데이터 형식입니다. 그러나 Javascript가 코드에서 이러한 구조를 나타낼 수 있는 유일한 언어는 아닙니다. 저는 일반적으로 '객체'{}...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.