[Sitecore and Docker] Install Sitecore 10.1 on Docker Desktop for Windows

As you all may know, Sitecore 10.1 was released a few days ago with a lot of enhancements and new features. Continue with Sitecore Docker series, I would like to play around with it. Now, lets be together to make an installation on Docker 😀.

Software Prerequisites

  • Windows 10 Professional or Enterprise version 1809 (2019 LTSC) or later. Version 1909 is recommended for enabling isolation.
  • Hyper-V is enabled.
  • Docker Desktop for Windows.
  • Docker Compose.
  • 16GB of RAM is the minimum, 32GB of RAM is recommended. The 32GB RAM requirement will somewhat depend on the number of instances and which topologies you plan to run. For example, you might be able to work with 16GB of RAM for an XP Workstation (XP0) or XM Server (XM1) instance, but will likely experience issues running a full XP Server (XP1) instance.
  • CPU Quad Core or higher.
  • At least 25GB of free disk space (SSD disks strongly recommended)
  • Ensure ports 443, 8079, 8080, 8984, 14330 available. Otherwise, your container(s) will fail to run.
  • Sitecore license file
  • Sitecore 10.1.0 Container Deployment Package

Installation

Step 1: Enable Hyper-V which allows us to run multiple operating system as VM’s on Windows. To enable it, refer to the Microsoft documentation. The Docker Desktop installer will also enable Hyper-V if necessary, but a machine restart will be required during install.

FYI: You can also use PowerShell as admin to run following command to enable Hyper-V

Enable-WindowsOptionalFeature -Online -FeatureName $("Microsoft-Hyper-V", "Containers") -all

Step 2: Download and install Docker Desktop for Windows. During installation, choose to use Windows containers instead of Linux containers. Once Docker Desktop has installed, make sure you are in Windows containers as below:

Open PowerShell as administrator and using command below to stop IIS that will ensure that all required ports are available and not being used by another process

iisreset /stop

Open Docker Settings and add “dns” as below. It will help to resolve some network issues. Restarting Docker is required.

Step 3: Create a folder on your local, let’s says D:\sitecore\docker and to which download and extract the Sitecore 10.1.0 Container Deployment Package. Rename the package with “SitecoreXP101Docker“. Navigate to D:\sitecore\docker\SitecoreXP101Docker\compose\ltsc2019\xp0. Download init.ps1 and place it to this folder. For more details about files amd structure, you can check here.

In the same folder, open Windows PowerShell as administrator and run init.ps1 with your license path.

Step 4: On the same Windows PowerShell, run command “docker-compose.exe up -d“. It will take a bit time to download packages.

If everything is running well. We will see this result.

Browse to https://xp0cm.localhost and you should see the Sitecore default website.

Browse to https://xp0cm.localhost/sitecore and using “admin” for the username and the password in the .env file (“Password12345” by default in init.ps1) to login. Now, we have Sitecore 10.1 running on Docker. With Sitecore 10.1, Sitecore Launchpad has new design. It’s very cool 😊.

Issues You May Get

1. Cannot start service Solr

We should ensure that the port 8984 available and is not being used by another processes. If we look at how Solr is defined in the docker-compose.yml file, we will see that the port is setup to map to 8984 on your local machine to 8983 on the running Solr container.

Also, you should check if you are having multiple Solr instances running on your machine from previous installed Sitecore instances. For me, I needed to stop the Solr service highlighted below because it’s using port 8984.

2. ERROR: for traefik Container “xxxxxxx” is unhealthy.

To address this issue, try the below steps:

  1. Open PowerShell with admin right.
  2. Run “docker-compose stop“.
  3. Run “docker-compose down“.
  4. Now run “iisreset /stop” to make sure that the required ports are free.
  5. Now run “docker-compose up -d".

If it still doesn’t work:

  1. Please check if you are using VPN. Turning on VPN can also cause problem when start up Docker.
  2. SQL password: please make sure SQL password in SQL_SA_PASSWORD to fit the default SQL Server policy as mentioned above. After changing the password in the .env file, you would need to clean up the already generated database files. This is accomplishing by running the clean.ps1. You can also manually delete its content under mssql-data folder. Please note that Docker should be stopped and downed first.

Thanks for reading and happy Sitecore Docker!

References:

Related Articles:

Leave a Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s