Troubleshooting image update issues in Sitecore can prove to be a complex task, as various factors could contribute to the problem. We recently encountered an issue where, after updating the “Sitecore Images,” our local project instance stopped working.

In order to resolve the issue, we attempted multiple possible solutions, including those available on the internet, but initially were not able to identify the root cause of the problem. To find the root cause of the problem, we chose to follow the following process:

Step 1: Setup Sitecore 10.2 – Non-Docker Instance

We downloaded and installed the “Sitecore 10.2” non-docker instance and integrated it with our project’s codebase. This step verified the proper functioning of our “Sitecore 10.2” non-docker instance along with our codebase, leaving no doubt that the issue did not occur because of the codebase.

Due to this reason, we also compared the bin folder of the “Sitecore 10.2” non-docker project instance along with the bin folder of the “Sitecore 10.2” docker project instance and discovered that the DLLs were mismatched.

To resolve this issue, we even tried to update the DLLs, but after updating one DLL, it presented another issue and continued to repeat.

Step 2: Troubleshooting the “Sitecore-xp0-cm” Image

Fortunately, one of my colleagues had a working “Sitecore 10.2” project instance with Docker on their machine. That is why we decided to debug the sitecore images to identify the root cause of the issue.

docker image inspect –format ‘{{json .}}’ “Add your image id here” ‘. | {Id: .Id, Digest: .Digest, RepoDigests: .RepoDigests, Labels: .Config.Labels}’

The above PowerShell command generates the output in JSON format. A code snippet from the output file is below.

“Id”: “sha256:55825c834be6aa053e9292c77f90cd64557cf5a5be21a8fb412f1b76074076aa”,
“RepoTags”: [
“scr.sitecore.com/sxp/sitecore-xp0-cm:10.2-ltsc2019”
],
“RepoDigests”: [
“scr.sitecore.com/sxp/sitecore-xp0-cm@sha256:d2ac9c0b631ff23aae6915836123049ff6d714e01fc8af49eef69cc07cb7abf5”
]
Digest ID of sitecore-xp0-cm image

sha256:d2ac9c0b631ff23aae6915836123049ff6d714e01fc8af49eef69cc07cb7abf5

From the above code snippet, locate the “RepoDigests,” extract the “Digest Id,” copy it, and search for it in the “Sitecore Docker Images Details List“. You will find that the “Sitecore-xp0-cm” image is downloading the “10.2.1-ltsc2019” tag or versioned image.

Our project relies on the “10.2.0-ltsc2019” version, which is why the local project instance wasn’t functioning.

To resolve this issue, we modified our “.env” file, where Docker-related variables are located, and included the necessary “Sitecore Version” on which our codebase is set up.

SITECORE_VERSION=10.2.0-ltsc2019

After modifying the “.env” file, follow the below steps in order to get the local project instance up and running.

Remove all the Docker containers
Remove all the Docker images
Restart the system
Download all the images and build the containers
After this, we were able to get our local project instance up and running.

Conclusion:

Significant modifications were made to the “.env” file, and the “Sitecore Version” was changed to “10.2.0-ltsc2019”. Our codebase and other higher-level environments, such as the live site, had been set up for the “Sitecore 10.2.0” version, and that’s why we opted for this step. If we switch to the “Sitecore Version” of “10.2.1-ltsc2019,” which is the latest by default, we would have to upgrade our codebase in addition to other environments.

Hope this helps. Happy Sitecore and Docker learning!!!