Harbor Standalone Docker Compose Upgrade Steps
search cancel

Harbor Standalone Docker Compose Upgrade Steps

book

Article ID: 451858

calendar_today

Updated On:

Products

VMware Tanzu Kubernetes Grid Management

Issue/Introduction

  • This article provides the recommended steps to upgrade Harbor Standalone (Docker Compose deployment) from version 2.5.0 to 2.15.2.

Environment

Harbor version  :  2.5.0 ,2.15.2
TKGm  vesion   :  2.5.x

 

Cause

  • This article provides the recommended steps for a standalone Harbor Docker Compose upgrade from v2.5.0 to v2.15.2
  • Harbor does not rigidly hardcode the NGINX version inside its source code. Instead, the goharbor/nginx-photon Dockerfile uses a package manager command (tdnf install -y nginx) to pull the latest stable nginx package directly from the underlying Photon OS 5.0 repositories at the time the release image is built.

Resolution

 

1. Ensure to perform a full backup of the Harbor data directory and the database.

2. Download the Harbor v2.15.2 release package from the official Harbor repository.

3. Navigate to the existing Harbor installation directory ( /opt/harbor ) and run the following command to stop the services:

    # docker-compose down

4. Extract the v2.15.2 archive to a new directory. 

5. Copy the harbor.yml file from the old installation to the new installation directory. Update the configuration if there are any new parameters in v2.15.2.

6. Run the prepare script in the new directory ( /opt/harbor_new ) to generate the new Docker Compose configuration:

   # ./prepare

7. Start the new Harbor services

   # docker-compose up -d

8. Check the status of the containers to ensure all services are healthy:

   # docker-compose ps

Additional Information

  • The nginx version included in Harbor v2.15.2 is updated periodically as part of the release; refer to the Harbor Release Notes for the specific version included in the v2.15.2 bundle.
  • Ensure all prerequisite system dependencies for v2.15.2 are met.
  • For issues during the upgrade, check the logs of the harbor-core and harbor-db containers using docker-compose logs <container_name>.
  • Because Harbor requires a multi-step upgrade path (v2.5.x ➔ v2.7.x ➔ v2.9.x ➔ v2.11.x ➔ v2.13.x ➔ v2.15.x), there isn't a single document that covers upgrading from v2.5.0 directly to v2.15.2

  • Main Upgrade Guide (Latest): Harbor Admin Guide

  • v2.11.x Upgrade Guide (useful as you pass through this version): Harbor Admin Guide