---
title: "Walkthrough: Upgrading SCCH 5.1 to 5.2 on Docker"
slug: "walkthrough--upgrading-scch-5-1-to-5-2-on-docker"
abstract: "How to upgrade the Sitecore Connect for Content Hub connector on Docker"
---
# Walkthrough: Upgrading SCCH 5.1 to 5.2 on Docker

This section explains how to upgrade Sitecore Connect for Content Hub (SCCH) to version 5.2 on a container platform.

Before you perform the upgrade for SCCH container to version 5.2, you must have the following:

- Sitecore Experience Platform (SXP) 10.3 deployed on Docker
- SCCH 5.1 deployed on Docker
- An up to date back up of the current SCCH 5.1 container files

This walkthrough describes how to:

- Build new docker images for SXP 10.4 and SCCH 5.2.
- Build the mssql-upgrade image
- Perform the upgrade

<details>
<summary><h2>Build new Docker images</h2></summary>

You must build the Docker images for the new versions of SXP and SCCH.

To build the SXP 10.4 and SCCH 5.2 Docker images:

1. Download the SXP container deployment 10.4 package from the [Sitecore download page](https://dev.sitecore.net/Downloads/Sitecore_Experience_Platform.aspx). Extract it to a new folder on your local workstation with the folder structure intact. Name the new folder, for example, `SCCH`.
2. Download the SCCH container deployment 5.2 package from the [Sitecore download page](https://dev.sitecore.net/Downloads/Sitecore_Connect_for_Content_Hub.aspx). Extract it to your local workstation with the folder structure intact. Copy the files in the `Chub.Asset\compose\<windows version>\<topology>` folder and paste them into the `\compose\<windows version>\<topology>` folder in the SXP 10.4 deployment structure.
3. Navigate to your Sitecore 10.3 container deployment folder. Copy the databases from the `mssql-data` folder and paste them in the Sitecore 10.4 container deployment `mssql-data` folder.
4. To deploy Sitecore 10.4, open a PowerShell window with administrator rights, navigate to the SC 10.4 Container deployment folder, and run the following commands:

    ```

    docker-compose build
    docker-compose up
    ```

5. Verify that Sitecore Container 10.4 is up and running successfully.

</details>

<details>
<summary><h2>Build the mssql-upgrade image</h2></summary>

You use a custom mssql-upgrade image to upgrade a Sitecore solution that has SCCH installed. To build a custom mssql-upgrade image, you must download the latest Sitecore XP mssql-upgrade image from the container registry and create a custom Dockerfile on top of it.

1. From the **Resource files for Modules 1.0.0** section on the [Sitecore download page](https://dev.sitecore.net/Downloads/Resource_files_for_Modules.aspx), download the Sitecore Connect for Content Hub Upgrade resources 1.0.0 package. Extract it to a folder on your local machine.
2. From the upgrade resources, copy the `\<current version>\Data` folder and paste it into the upgrade folder for the Windows version and topology you are using, for example, `ltsc2019\upgrade\xp1`.
3. In the `<current version>` folder, create a docker file and name it `Dockerfile`. In the file, add instructions to point its base image to the 10.4 mssql-upgrade image. The file will look, for example, like this:

    ```csharp
    ARG BASE_IMAGE=ideftdevacr.azurecr.io/sxp/sitecore-xp1-mssql-upgrade:10.4.0.006572.994-10.0.17763.2183-ltsc2019-unstable
    FROM ${BASE_IMAGE}
    SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
    # Add chub module
    COPY < SCCH Module Upgrade Resource file path> "C:\data\ResourceItems\10.1.0\modules\"
    ```

    > [!note]
    > In the Dockerfile, ensure that ARG BASE\_IMAGE parameter points to the mssql-upgrade image, and that the Data folder local path is set to the 6.0.0\\Data folder in the folder you created in step 1.

4. To build the mssql-upgrade image, open a PowerShell window, navigate to the folder where you placed the Dockerfile, and run the following command:

    ```text
    docker build . -t "<imageName>:<available port number>”
    ```

5. Verify that Docker has created an image with the name you specified.

</details>

<details>
<summary><h2>Perform the upgrade</h2></summary>

When you have prepared the container images, you can perform the upgrade.

To perform the upgrade:

1. On your local machine, in a PowerShell window, navigate to the SCCH Deployment 5.2 folder. Navigate to the upgrade folder for the Windows version and topology you are using, for example, `ltsc2019\upgrade\xp1`.
2. In the topology folder, run the `compose-init.ps1 script`. This script updates the environment configuration file with the appropriate values for all the environment variables including the SQL username, SQL password, SQL Server address, and the Sitecore license file.

    > [!note]
    > For more information about running the script to prepare for the deployment, see the Installation Guide for Developer Workstation with Containers on the [Sitecore download page](https://dev.sitecore.net/Downloads/Sitecore_Experience_Platform.aspx).

3. In the upgrade folder, verify that the `upgrade.env` file has the correct details. For more details, see the [Upgrade Container Deployment Guide](https://dev.sitecore.net/Downloads/Sitecore_Experience_Platform.aspx) for SXP 10.4.0.
4. In the `docker-compose.upgrade.yml` file, update the `image` setting with the mssql-upgrade image you created previously.
5. Open a new PowerShell window with administrator rights. Navigate to the upgrade directory.
6. Verify that the mssql container is up and running.
7. To perform the upgrade, run this command:

    ```text
    docker-compose.exe -f .\docker-compose.upgrade.yml --env-file .\upgrade.env up
    ```

8. To check the status of the upgrade, run this command:

    ```text
    docker-compose.exe -f .\docker-compose.upgrade.yml --env-file .\upgrade.env ps
    ```

</details>