Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Automated installation of VMware Harbor Registry on Photon OS
DOCKER_COMPOSE_VERSION=1.27.4
HARBOR_VERSION=1.10.6
DEFAULT_HARBOR_PASSWORD='Tanzu1!'
HARBOR_HOSTNAME=registry.tanzu.local
systemctl enable docker
systemctl start docker
curl -L "https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
curl -L https://github.com/goharbor/harbor/releases/download/v${HARBOR_VERSION}/harbor-offline-installer-v${HARBOR_VERSION}.tgz -o harbor-offline-installer-v${HARBOR_VERSION}.tgz
tar xvzf harbor-offline-installer*.tgz
rm -f harbor-offline-installer-v${HARBOR_VERSION}.tgz
cd /root/harbor
sed -i "s/hostname:.*/hostname: ${HARBOR_HOSTNAME}/g" harbor.yml
# comment below for HTTPS (default on Harbor) but you will also need to specify your own generated TLS certificate
sed -i 's/^https:.*/#https/g' harbor.yml
sed -i "s/harbor_admin_password:.*/harbor_admin_password: ${DEFAULT_HARBOR_PASSWORD}/g" harbor.yml
./install.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment