How to install a hotfix package in a containerized environment


Overview

The current article contains details on hotfix packages for containerized solutions and instructions on how to install hotfix packages in containerized environments.

Hotfix packages for containers

A hotfix package contains:

How to apply a Sitecore hotfix package for containers

  1. Unzip the hotfix package.
  2. Open the ReadMe file. If the package contains some extra files, follow the instructions from ReadMe file.
  3. Apply any changes to the file system. The hotfix must be applied to the image of the Sitecore role container that the hotfix is created for. The hotfix could be valid for several images.
    To apply the hotfix to the image and add a new configuration layer, add some instructions to the Dockerfile for the Sitecore role.
    These instructions must be added for each Sitecore role that you are going to apply the hotfix to.
    The instructions in the Dockerfile must extract the files from the Sitecore Hotfix package for Containers and copy them to the corresponding location in the Website root folder inside the container.
    Here is an example how this can be done for the CM role:
    • Define the context for the cm service in the docker-compose.override.yml file, for example:
      context: ./build/cm
    • Copy the extracted files from the Sitecore Hotfix package for Containers to the \build\cm\hotfix folder
    • Add the COPY instruction to the \build\cm\Dockerfile folder, for example:
      COPY .\hotfix C:\inetpub\wwwroot
    If the hotfix package contains an Init.ps1 file, the Dockerfile must contain a PowerShell command that runs this file.
  4. Use the updated Dockerfile to build a new image and deploy it to your containerized solution.
    This can be done, for example, using the following command:
    docker compose up -d