Skip to content

Instantly share code, notes, and snippets.

@lamw
Created November 19, 2020 20:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lamw/7069bc74e020485d0de8c43a0ff8f67f to your computer and use it in GitHub Desktop.
Save lamw/7069bc74e020485d0de8c43a0ff8f67f to your computer and use it in GitHub Desktop.
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