Create Own Docker Registry with GUI using Harbor

Hardware Requirement
Comment Line no 13 to 18
{
"headerBgColor": "#004a70",
"headerLogo": "",
"loginBgImg": "",
"appTitle": "BITS REGISTRY",
"product": {
"title": "BITS REGISTRY",
"company": "BITS REGISTRY",
"name": "BITS REGISTRY",
"introduction": {
"zh-cn": "",
"es-es": "",
"en-us": ""
}
}
}
#! /bin/bashif [ "$#" -ne 1 ]
then
echo "Error: No domain name argument provided"
echo "Usage: Provide a domain name as an argument"
exit 1
fi
DOMAIN=$1# Create root CA & Private keyopenssl req -x509 \
-sha256 -days 356 \
-nodes \
-newkey rsa:2048 \
-subj "/CN=${DOMAIN}/C=US/L=San Fransisco" \
-keyout rootCA.key -out rootCA.crt
# Generate Private keyopenssl genrsa -out ${DOMAIN}.key 2048# Create csf confcat > csr.conf <<EOF
[ req ]
default_bits = 2048
prompt = no
default_md = sha256
req_extensions = req_ext
distinguished_name = dn
[ dn ]
C = IN
ST = DELHI
L = ASIA
O = KOLKATA
OU = NICDev
CN = ${DOMAIN}
[ req_ext ]
subjectAltName = @alt_names
[ alt_names ]
DNS.1 = ${DOMAIN}
DNS.2 = www.${DOMAIN}
IP.1 = 192.168.11.174
EOF# create CSR request using private keyopenssl req -new -key ${DOMAIN}.key -out ${DOMAIN}.csr -config csr.conf# Create a external config file for the certificatecat > cert.conf <<EOFauthorityKeyIdentifier=keyid,issuer
basicConstraints=CA:FALSE
keyUsage = digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment
subjectAltName = @alt_names
[alt_names]
DNS.1 = ${DOMAIN}
EOF# Create SSl with self signed CAopenssl x509 -req \
-in ${DOMAIN}.csr \
-CA rootCA.crt -CAkey rootCA.key \
-CAcreateserial -out ${DOMAIN}.crt \
-days 365 \
-sha256 -extfile cert.conf

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store