Sitecore Commerce 10.1 With Containers
How Much Better Is Sitecore 10.1 With Docker?
Sitecore has been dockerized for a while now but the latest commerce release has truly shown me the benefits of this approach over the traditional setup. Sitecore Commerce 10.1 with containers is much easier and simpler to set up, with a lot fewer moving parts, making errors less common. I was able to install a fully scaled 10.1 commerce instance with minimal issues.
One of the largest and biggest time-saving improvements with this version of Sitecore is having Sitecore XP included in the Sitecore Commerce installation. You no longer have to set up Sitecore beforehand. This alone saves hours.
There are detailed instructions in the install guide but I will cover the things I got hung up on and what I found to be noteworthy.
One of the first things to decide is what topology you want to use, and what OS you are running. XC0 is meant to be the developer version with roles merged into containers, while XC1 is fully scaled.
The only issue I had with this part is that in this release to use SXA storefront you must use the fully scaled XC1-CXA topology. I wanted SXA so I went with this topology. Once you have decided on your topology you will want to be aware of what OS you are running and what version of that OS.
Sitecore only supports Windows 10 and Windows Server's latest 2 releases. This is important because the OS of the Image from Sitecore must be supported on your OS, as well as the isolation mode. You can see compatibility here.
As you can see from the chart, being on the latest version of Windows (which I am on) supports all Image types in Hyper-V isolation. Process isolation is the ideal choice when available as it uses less system resources, but you will most likely need to use Hyper-V on a developer setup.
This is where the first gotcha comes in. Knowing I want XC1-CXA topology and that I only support Hyper-V, I needed to change the isolation mode in the .env file. The default is process, which won t work on my PC and cause errors during installation..
Make sure your isolation mode is supported on your OS before trying to install.
Once you ve decided on topology and isolation you can follow the next steps from the install guide which I summarized are:
-
Update .env file.
-
Install certs (there is a utility script).
-
Run docker compose.
Once docker compose finishes you will have a fully functional Sitecore Environment running in containers. My only gripe with this setup though is that the minimum requirement for containers is 32GB of ram. On my local machine running scaled, Sitecore Commerce in Hyper-V was using a steady 32GB of memory for all the container VMS.
All in all the entire setup is much easier than the traditional method. There is one config file to maintain, and most of the install is done through one docker command. Also, you can completely stop and start the entire set of containers with one command, preventing you from needing SQL and Solr running in the background all the time, or having to have multiple instances of these services. I would highly recommend if you are going to set up Sitecore Commerce locally to use containers.