---
title: "Walkthrough: Preparing to install the SCCH connector module in a container environment"
slug: "walkthrough--preparing-to-install-the-scch-connector-module-in-a-container-environment"
abstract: "How to prepare the installation files and Docker images needed for installing the Sitecore Connect for Content Hub connector in a container environment."
---
# Walkthrough: Preparing to install the SCCH connector module in a container environment

To prepare for adding the Sitecore Connect for Content Hub (SCCH) connector to your installation, regardless of whether you are deploying to Docker or Azure Kubernetes service, follow the steps in this walkthrough.

This walkthrough describes how to:

- Prepare the installation files
- Build the Docker images

<details>
<summary><h2>Prepare the installation files</h2></summary>

To prepare the files required for the installation:

1. Download the SCCH container deployment 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.
2. Download the Sitecore Experience Platform container deployment 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`.
3. In the folder where you extracted the SCCH package in [Step 1](https://doc.sitecore.com/xp/en/developers/connect-for-ch/52/connect-for-content-hub/walkthrough--preparing-to-install-the-scch-connector-module-in-a-container-environment.html#UUID-6de88271-7977-6fb7-bd5f-269544942bf0_N1618829816505 "Step 1"), navigate to the folder for the Windows version and topology you are using, for example, `SCCH\compose\ltsc2019\xp1`. Copy the `docker-compose.override.yml` file to the `SCCH\compose\<version>\<topology>` folder you created in [Step 2](https://doc.sitecore.com/xp/en/developers/connect-for-ch/52/connect-for-content-hub/walkthrough--preparing-to-install-the-scch-connector-module-in-a-container-environment.html#UUID-6de88271-7977-6fb7-bd5f-269544942bf0_N1618829907621 "Step 2").
4. In the `SCCH` folder, navigate to the folder for your Windows version and topology you are using, for example, `compose\ltsc2019\xp1`. Open the `.env` file in a text editor. At the bottom of the file, add a definition for the SCCH image. For example:

    ```text
    SCCH_IMAGE= scr.sitecore.com/sxp/modules/sitecore-chub-assets:5.2.0-<target-OS-to-deploy>
    ```

5. In the folder where you extracted the SCCH package, open the `.env-example` file in a text editor, and copy all the contents.
6. At the bottom of the `.env` file from [Step 4](https://doc.sitecore.com/xp/en/developers/connect-for-ch/52/connect-for-content-hub/walkthrough--preparing-to-install-the-scch-connector-module-in-a-container-environment.html#UUID-6de88271-7977-6fb7-bd5f-269544942bf0_N1618910452857 "Step 4"), after the SCCH image data, paste in the contents from the `.env-example` file. Save the `.env` file.

</details>

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

When you have prepared the installation files, you must create Docker files for each role and build the Docker images.

> [!note]
> For more information on image assets, see the documentation on how to [Add Sitecore Modules](https://doc.sitecore.com/developers/102/developer-tools/en/add-sitecore-modules.html)[Add Sitecore Modules](https://doc.sitecore.com/ja/developers/102/developer-tools/add-sitecore-modules.html).

To build the images:

1. In the `SCCH` folder, navigate to the folder for your Windows version and topology you are using, for example, `compose\ltsc2019\xp1`. Create a subfolder and name it `module`.
2. In the `module` folder, create the following subfolders:
    - `cm`
    - `cd`

        > [!note]
        > You only have to create the `cd` subfolder if you are deploying to an XP1 or XM1 topology.

    - `mssql`

        > [!note]
        > You only have to create the `mssql` subfolder if you are deploying to Sitecore 10.1.3 on Docker.

    - `mssql-init`

        > [!note]
        > You only have to create the `mssql-init` subfolder if you are deploying to Sitecore 10.1.3 on Kubernetes.

3. In each subfolder, create a new file and name it `Dockerfile`.
4. In the `cm` folder, in the `Dockerfile` file, enter the following instructions:

    ```

    # escape=`
    ARG BASE_IMAGE
    ARG SCCH_IMAGE
    ARG TOOL_IMAGE

    FROM ${SCCH_IMAGE} as scch
    FROM ${TOOL_IMAGE} as tooling
    FROM ${BASE_IMAGE}

    SHELL [“powershell”, “-Command”, “$ErrorActionPreference = ‘Stop’; $ProgressPreference = ‘SilentlyContinue’;”]

    WORKDIR C:\inetpub\wwwroot

    # Add SCCH module
    COPY --from=scch \module\cm\content .\

    # Add tools from sitecore-docker-tools-assets
    COPY --from=tooling \tools\ C:\tools\

    # Apply SCCH transformation files
    RUN C:\tools\scripts\Invoke-XdtTransform.ps1 -Path C:\inetpub\wwwroot -XdtPath \inetpub\wwwroot\App_Data\Transforms\scch\xdts
    ```

5. If you are deploying an XP1 or XM1 topology, in the `cd` folder, in the `Dockerfile` file, enter the following instructions:

    ```

    # escape=`
    ARG BASE_IMAGE
    ARG SCCH_IMAGE
    ARG TOOL_IMAGE

    FROM ${SCCH_IMAGE} as scch
    FROM ${TOOL_IMAGE} as tooling
    FROM ${BASE_IMAGE}

    SHELL [“powershell”, “-Command”, “$ErrorActionPreference = ‘Stop’; $ProgressPreference = ‘SilentlyContinue’;”]

    WORKDIR C:\inetpub\wwwroot

    # Add SCCH module
    COPY --from=scch \module\cm\content .\

    # Copy SCCH transformation files
    COPY --from=scch \module\transforms\ C:\transforms\

    # Add tools from sitecore-docker-tools-assets
    COPY --from=tooling \tools\ C:\tools\

    # Apply SCCH transformation files
    RUN C:\tools\scripts\Invoke-XdtTransform.ps1 -Path C:\inetpub\wwwroot -XdtPath \inetpub\wwwroot\App_Data\Transforms\scch\xdts
    RUN C:\tools\scripts\Invoke-XdtTransform.ps1 -Path C:\inetpub\wwwroot -XdtPath \transforms\cd
    ```

6. If you are deploying to Sitecore 10.1.3 in Docker, in the `mssql` folder, in the `Dockerfile` file, enter the following instructions:

    ```

    # escape=`
    ARG BASE_IMAGE
    ARG SCCH_IMAGE

    FROM ${SCCH_IMAGE} as scch
    FROM ${BASE_IMAGE}

    SHELL [“powershell”, “-Command”, “$ErrorActionPreference = ‘Stop’; $ProgressPreference = ‘SilentlyContinue’;”]

    # Copy SCCH dacpac files
    COPY --from=scch C:\module\db C:\resources\scch_data

    # Copy SCCH tool files
    COPY --from=scch C:\module\tools\ C:\scch\

    #  Deploy SCCH dacpac files
    RUN C:\scch\Set-DbContainmentLevel.ps1 -moduleDacpacSource C:\resources\scch_data -isContainer $true; `
    Remove-Item -Path C:\scch -Recurse -Force; `
    C:\DeployDatabases.ps1 -ResourcesDirectory C:\resources\scch_data; `
    Remove-Item -Path C:\resources\scch_data -Recurse -Force;
    ```

7. If you are deploying to Sitecore 10.1.3 in Kubernetes, in the `mssql-init` folder, in the `Dockerfile` file, enter the following instructions:

    ```

    # escape=`
    ARG BASE_IMAGE
    ARG SCCH_IMAGE

    FROM ${SCCH_IMAGE} as scch
    FROM ${BASE_IMAGE}

    SHELL [“powershell”, “-Command”, “$ErrorActionPreference = ‘Stop’; $ProgressPreference = ‘SilentlyContinue’;”]

    # Copy SCCH dacpac files
    COPY --from=scch C:\module\db C:\resources\scch_data

    # Copy SCCH tool files
    COPY --from=scch C:\module\tools\ C:\scch\

    #  Prepare SCCH dacpac files
    RUN C:\scch\Set-DbContainmentLevel.ps1 -moduleDacpacSource C:\resources\scch_data -isContainer $true; `
    Remove-Item -Path C:\scch -Recurse -Force;# escape=`
    ARG BASE_IMAGE
    ARG DCRMCNN_IMAGE

    FROM ${DCRMCNN _IMAGE} as dcrm
    FROM ${BASE_IMAGE}

    SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]

    # Deploy DCRM Staging database file
    COPY --from=dcrm  C:\module\db C:\resources\dcrm
    ```

8. Navigate to the `SCCH\compose\<version>\<topology>` folder. Open the `docker-compose.override.yml` file for edit, and add the following instructions for the `cm` image:

    ```

    cm:
        image: sitecore-chub-${TOPOLOGY}-cm:${SITECORE_VERSION}
        build:
          context: ./module/cm
          args:
            BASE_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-${TOPOLOGY}-cm:${SITECORE_VERSION}
            SCCH_IMAGE: ${SCCH_IMAGE}
            TOOL_IMAGE: ${TOOL_IMAGE}
    ```

9. If you are deploying to an XP1 or XM1 topology, add these instructions for the `cd` image:

    ```

    cd:
        image: sitecore-chub-${TOPOLOGY}-cd:${SITECORE_VERSION}
        build:
          context: ./module/cd
          args:
            BASE_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-${TOPOLOGY}-cd:${SITECORE_VERSION}
            SCCH_IMAGE: ${SCCH_IMAGE}
            TOOL_IMAGE: ${TOOL_IMAGE}
    ```

10. If you are deploying to Sitecore 10.1.3 in Docker, add these instructions for the `mssql` image:

    ```

    mssql:
        image: sitecore-chub-${TOPOLOGY}-mssql:${SITECORE_VERSION}
        build:
          context: ./module/mssql
          args:
            BASE_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-${TOPOLOGY}-mssql:${SITECORE_VERSION}
            SCCH_IMAGE: ${SCCH_IMAGE}
    ```

11. If you are deploying to Sitecore 10.1.3 in Kubernetes, add these instructions for the `mssql-init` image:

    ```

    mssql-init:
        image: sitecore-chub-${TOPOLOGY}-mssql-init:${SITECORE_VERSION}
        build:
          context: ./module/mssql-init
          args:
            BASE_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-${TOPOLOGY}-mssql-init:${SITECORE_VERSION}
            SCCH_IMAGE: ${SCCH_IMAGE}
    ```

12. In the Windows console, go to the `SCCH\compose\<version>\<topology>` folder where the `docker-compose.override.yml` file is. Run the following command:

    ```text
    docker-compose build
    ```

13. If you are deploying to Docker, continue with the instructions in [Add the SCCH connector module to Sitecore in Docker](https://doc.sitecore.com/xp/en/developers/connect-for-ch/52/connect-for-content-hub/add-the-scch-connector-module-to-sitecore-in-docker.html "Add the SCCH connector module to Sitecore in Docker").

    If you are deploying to Kubernetes, continue with the instructions in [Walkthrough: Adding the SCCH connector module to Sitecore in Azure Kubernetes Service](https://doc.sitecore.com/xp/en/developers/connect-for-ch/52/connect-for-content-hub/walkthrough--adding-the-scch-connector-module-to-sitecore-in-azure-kubernetes-service.html "Walkthrough: Adding the SCCH connector module to Sitecore in Azure Kubernetes Service").

> [!note]
> Some modifications to Sitecore deployments, such as adding connection strings or changing the web configuration files, require you to use configuration transforms to change the configuration files. For information on how to apply configuration transforms, see the Sitecore [container development documentation](https://doc.sitecore.com/developers/102/developer-tools/en/applying-configuration-transforms.html)[container development documentation](https://doc.sitecore.com/ja/developers/102/developer-tools/applying-configuration-transforms.html).

</details>