Upgrade Docker
Upgrading Artifactory using Docker provides a reliable, containerized to approach managing your instance. This method simplifies the upgrade process and its dependencies.
Upgrading Artifactory using Docker provides a reliable, containerized approach to managing your instance. This method simplifies the upgrade process and its dependencies.
Choose your environment below to get started:
Upgrade Artifactory using Docker Compose
This topic provides the steps to upgrade your JFrog Artifactory 7.x instance installed via Docker Compose to a newer 7.x version.
If you want to upgrade from any version lower than 7.x, see Upgrading Artifactory from 6.10.x to 7.x.
Preparation and Pre-Upgrade Checks
To ensure a smooth upgrade, consider the following:
- Backup Your Data: We strongly recommend you to perform a full backup of your Artifactory data directory (
$JFROG_HOME/artifactory/var) and database before starting any upgrade process. This allows for recovery in case of unexpected issues. - Review Release Notes: Always check the Artifactory Release Notes for the target version. They may contain critical information, breaking changes, or specific pre-upgrade tasks not covered here.
- Downtime: In a single-node setup, the Artifactory service will be unavailable to users during the upgrade. In High-Availability (HA) mode, a rolling upgrade ensures only one node is down at a time, allowing the service to remain available to users.
Upgrade Steps
-
Stop the current containers:
docker-compose -p rt down -
Download and extract the new archive: Download the new archive, then extract its contents and navigate to the folder.
tar -xvf jfrog-artifactory-<pro|oss|cpp-ce>-<version>-compose.tar.gz cd artifactory-<pro|oss|cpp-ce>-<version> -
Copy the .env file and run the config script: Copy the contents of the original
.envfile (except for the version field) into the newly extracted.envfile. Then, run theconfig.shscript to set up folders with the required ownership../config.sh -
Start the Artifactory services: Start PostgreSQL first, if applicable, then start the main Artifactory services.
# Starting from Artifactory 7.8.x, PostgreSQL needs to be started before starting the other services. # if PostgreSQL 9.6.11 running docker-compose -p rt-postgres -f docker-compose-postgres-9-6.11v.yaml up -d # if PostgreSQL 10.13 running docker-compose -p rt-postgres -f docker-compose-postgres-10-13v.yaml up -d # if PostgreSQL 12.3 running docker-compose -p rt-postgres -f docker-compose-postgres.yaml up -d # Start Artifactory docker-compose -p rt up -d -
Verify the Upgrade:
-
Access UI: Access
http://<SERVER_HOSTNAME>:8082/ui/in your browser to verify the UI loads. -
Monitor Logs: Use this command to check for any startup errors.
tail -f $ROOT_DATA_DIR/var/log/console.log
-
Troubleshooting and Post-Upgrade Notes
- Database Migrations: During the first startup after an upgrade, Artifactory may run database converters to execute changes in the database schema.
Upgrade Artifactory using Docker
This topic provides the steps to upgrade your JFrog Artifactory 7.x instance installed via Docker to a newer 7.x version.
If you want to upgrade from any version lower than 7.x, see Upgrading Artifactory from 6.10.x to 7.x.
Preparation and Pre-Upgrade Checks
To ensure a smooth upgrade, consider the following:
- Backup Your Data: We strongly recommend you to perform a full backup of your Artifactory data directory (
$JFROG_HOME/artifactory/var) and database before starting any upgrade process. This allows for recovery in case of unexpected issues. - Review Release Notes: Always check the Artifactory Release Notes for the target version. They may contain critical information, breaking changes, or specific pre-upgrade tasks not covered here.
- Downtime: In a single-node setup, the Artifactory service will be unavailable to users during the upgrade. In High-Availability (HA) mode, a rolling upgrade ensures only one node is down at a time, allowing the service to remain available to users.
Upgrade Steps
-
Stop and remove the existing container:
docker stop artifactory docker rm -f artifactory -
Set the path to your current Artifactory home and permissions: Set the path to your existing Artifactory data directory and ensure the permissions are correct.
export ARTIFACTORY_HOME=<Mount Path to your current Artifactory data directory> chown -R 1030:1030 $ARTIFACTORY_HOME -
Start the new Artifactory container:
docker run --name artifactory -v $ARTIFACTORY_HOME:/var/opt/jfrog/artifactory -d -p 8081:8081 -p 8082:8082 releases-docker.jfrog.io/jfrog/artifactory-<pro|oss|cpp-ce>:<version> -
Verify the Upgrade:
-
Access UI: Access
http://<SERVER_HOSTNAME>:8082/ui/in your browser to verify the UI loads. -
Monitor Logs: Use this command to check for any startup errors.
docker logs -f artifactory
-
Troubleshooting and Post-Upgrade Notes
- Database Migrations: During the first startup after an upgrade, Artifactory may run database converters to execute changes in the database schema.
Updated 2 days ago
