Since Sitecore XP 10.1.0, Sitecore distributes pre-releases of the next update release to provide customers with fixes for their hotfix requests. The pre-releases are cumulative, and each pre-release contains all the changes that were implemented in the earlier pre-releases in that series. These pre-releases are then all rolled into the next update release, for example, Sitecore XP 10.1 Update 2. You can follow the below steps to deploy the hotfix to the Sitecore docker image:
- Download the Sitecore pre-release or hotfix package You can do this from the Sitecore website or by contacting Sitecore support. For 10.3, You can download the package from here.
- Add Dockerfile instructions for each Sitecore required server role To add the Dockerfile instructions for the Content Management (CM) role, on your solution, open the Sitecore runtime Dockerfile for the CM role and add the following instructions to pull the image. Make Sure, ${PARENT_IMAGE} should be applied in the last.
# escape=`
ARG PARENT_IMAGE
# To add pre-release or delta asset image
ARG DELTA_ASSET_IMAGE
# add any other tooling image, like MANAGEMENT_SERVICES_IMAGE
[...]
FROM ${DELTA_ASSET_IMAGE} as deltaAssetImage
# Make sure Parent image or base image should be in the last
FROM ${PARENT_IMAGE}
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
WORKDIR C:\inetpub\wwwroot
# Copy cm resources from pre-releae inage
COPY --from=deltaAssetImage \platform\cm \
- Update the Docker Compose File To configure the custom image for the CM role in Docker Compose, add the following code to the docker-compose.override.yml file:
cm:
image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-xp0-cm:${VERSION:-latest}
build:
context: ./docker/build/cm
args:
PARENT_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-xp0-cm:${SITECORE_VERSION}
DELTA_ASSET_IMAGE: ${SITECORE_PRE_REGISTRY}sitecore-xp0-assets:${DELTA_ASSET_IMAGE_VERSION}
[...]
- Get the tags from JSON file and update the .env: You can refer to Released-images-sxp-pre-10.3.1-008828-21022023-172356.json from the downloaded hotfix folder and get all the required tags. Update the
.env
file with these variables :
SITECORE_PRE_REGISTRY=scr.sitecore.com/sxp-pre/
DELTA_ASSET_IMAGE_VERSION=10.3.1.008828.343-10.0.17763.3887-1809
- Build the images and up the containers: You can log in to the Sitecore instance and check pre-release has been applied.
Refer this blog for more details: https://sitecorewithraman.wordpress.com/2023/03/12/apply-hotfix-to-sitecore-docker-images/