搭建企業級Docker Registry -- Harbor
# curl -L https://github.com/docker/compose/releases/download/1.7.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose # chmod +x /usr/local/bin/docker-compose
3、配置SSL
# touch /etc/pki/CA/{index.txt,serial} # echo 01 > /etc/pki/CA/serial # (umask 077;openssl genrsa -out /etc/pki/CA/private/cakey.pem 2048)
填寫的信息:
Country Name (2 letter code) [XX]:CN State or Province Name (full name) []:China Locality Name (eg, city) [Default City]:Beijing Organization Name (eg, company) [Default Company Ltd]:wts Organizational Unit Name (eg, section) []:sysops Common Name (eg, your name or your server‘s hostname) []:wts.com Email Address []:[email protected]
# cat /etc/pki/CA/cacert.pem >> /etc/pki/tls/certs/ca-bundle.crt # mkdir /app/ssl # (umask 077;openssl genrsa -out /app/ssl/harbor.key 2048) # openssl req -new -key /app/ssl/harbor.key -out /app/ssl/harbor.csr
填寫的信息:
Country Name (2 letter code) [XX]:CN State or Province Name (full name) []:China Locality Name (eg, city) [Default City]:Beijing Organization Name (eg, company) [Default Company Ltd]:wts Organizational Unit Name (eg, section) []:sysops Common Name (eg, your name or your server‘s hostname) []:wts.com Email Address []:[email protected]