728x90
Releases · goharbor/harbor
An open source trusted cloud native registry project that stores, signs, and scans content. - goharbor/harbor
github.com
Harbor – Configure HTTPS Access to Harbor
Configure HTTPS Access to Harbor
goharbor.io
openssl genrsa -out yourdomain.com.key 4096
openssl req -sha512 -new \
-subj "/C=CN/ST=Beijing/L=Beijing/O=example/OU=Personal/CN=yourdomain.com" \
-key yourdomain.com.key \
-out yourdomain.com.csr
cat > v3.ext <<-EOF
authorityKeyIdentifier=keyid,issuer
basicConstraints=CA:FALSE
keyUsage = digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment
extendedKeyUsage = serverAuth
subjectAltName = @alt_names
[alt_names]
DNS.1=yourdomain.com
DNS.2=yourdomain
DNS.3=hostname
EOF
openssl x509 -req -sha512 -days 3650 \
-extfile v3.ext \
-CA ca.crt -CAkey ca.key -CAcreateserial \
-in yourdomain.com.csr \
-out yourdomain.com.crt
cp yourdomain.com.crt /data/cert/
cp yourdomain.com.key /data/cert/
openssl x509 -inform PEM -in yourdomain.com.crt -out yourdomain.com.cert
cp yourdomain.com.cert /etc/docker/certs.d/yourdomain.com/
cp yourdomain.com.key /etc/docker/certs.d/yourdomain.com/
cp ca.crt /etc/docker/certs.d/yourdomain.com/
systemctl restart docker
## 다운로드 받은 HARBOR 압축 풀기
tar xzvf harbor-offline-installer-v2.3.2.tgz
cp harbor.yml.tmpl harbor.yml
vi harbor.yml
# Configuration file of Harbor
## 아래 변경
hostname: harbor.tkg.io
certificate: /data/cert/yourdomain.com.crt
private_key: /data/cert/yourdomain.com.key
실행, 필자는 여러가지가 필요해서 3개를 다 구성하였다. (추후 테스트 하기 위해)
## 원하는 서비스가 있으면 별도로 붙이면 된다. 기본은
./install.sh
완료 화면
이미지 PUSH
반응형
'K8S > DOCKER' 카테고리의 다른 글
(DK) HARBOR 구성 (0) | 2021.07.01 |
---|---|
(DK) Docker Install (0) | 2021.06.11 |