Sitecore with Containers : Install Sitecore 10.1 Docker Desktop for Windows



This blog describes how to set up the Sitecore 10.1 version on docker.

Pre-requisites:

To run Docker on Windows 10, you need the following:

  • You must run Windows 10 Professional or Enterprise version 1903 or later. For enabling process isolation, you need version 1909, or later.
  • You must enable Hyper-V. The Docker Desktop installer enables Hyper-V if necessary, but a machine restart is then required during install.

Hardware Requirements

  • 16GB of RAM is the minimum, 32GB of RAM is recommended. This depends on the number of instances and topologies you want to run (that is, the number of simultaneously running containers). For example, 16GB may be sufficient for XM1 or XP0 instances, but will probably have problems running a full XP1 instance.
  • A quad-core, or higher, CPU.
  • At least 25GB of free disk space for Sitecore container images. SSD storage is highly recommended for optimal performance when downloading and running Docker containers.

I am using Azure VM Standard D8s v3 (8 vcpus, 32 GiB memory) OS – Windows (Windows 10 Pro)

Network Requirements:

  • Enable Hyper-V on machine

Open windows features and select Hyper-V. Please ensure to select all options of Hyper-V as per the below snapshot and restart the machine.

Once installation is completed, please run docker desktop.

You will see a system tray icon and docker running in Linux containers. Switch it to windows container

Extract it.

Navigate to the compose\sxp\10.1\<Windows version>\<topology> folder for the topology that you want to deploy, for example, compose\ltsc2019\xp1

I will use XP0 topology

  • Now next step is to update the .env file parameter and create the necessary certificates.

For this Sitecore has provided a PowerShell file to fill the .env file parameter and generate necessary certificates. Please download init.ps1 from https://github.com/Sitecore/docker-examples/tree/develop/getting-started and copy to C:\sc10.1\container-deployment-sxp-10.1.0.005207.309\compose\sxp\10.1\ltsc2019\xp0

Run Powershell in admin mode and navigate to the path where you copied init.ps1

Now run the below command

.\init.ps1 -LicenseXmlPath C:\license\license.xml -SitecoreAdminPassword b -SqlSaPassword Sitecore@123

  • Pull the packages by running the below command

docker-compose pull

  • Create and start the containers by running the below command. Please ensure IIS is stopped.

docker-compose up -d

Hit URL – https://xp0cm.localhost/

You can rebuild the indexes and are good to go.

Issues:

Sitecore Solr init container stopped due to error Sitecore collections already exist. Use collection name prefix different from ‘Sitecore.

The Sitecore container environment includes a solr-init container that runs on startup, creates the needed cores in your Solr container (if they do not exist already), and then exits. This is the expected behavior.

However, this container does not populate the Solr managed schemas or rebuild indexes. You need to do this manually or with custom scripting. You can see Solr-related errors in your container logs if you do not do this.

To populate the managed schema and update indexes:

  1. Log in to Sitecore as admin.
  2. Open the Control Panel and populate the managed schema for all search indexes.
  3. While still in the Control Panelrebuild search indexes.

Thanks, Sitecore!!

References:

https://doc.sitecore.com/en/developers/100/developer-tools/run-your-first-sitecore-instance.html

https://doc.sitecore.com/en/developers/101/developer-tools/run-your-first-sitecore-instance.html

Comments