Published Date: 27 September, 2020

One of the eye catching and most talked feature of Sitecore 10 is support on Dockers Container. Sitecore is providing support on Dockers container officially now. It means in case of any issue on Dockers, we can reach to Sitecore for getting support and solutions. It's a huge relief for the company would like to use Dockers Container for the development and production.

Below are the links that can give me more contest on what is Dockers and its benefits

https://www.microfocus.com/documentation/enterprise-developer/ed40/ES-WIN/GUID-AF13027E-77FD-4FA0-AAD8-27F5D00CFEDB.html

https://www.microfocus.com/documentation/enterprise-developer/ed40/ES-WIN/GUID-F5BDACC7-6F0E-4EBB-9F62-E0046D8CCF1B.html

Now would like to talk about how we can install Sitecore 10 on Dockers container.

Software Requirements

Hardware Requirements

  • Sitecore recommend having 32 GB of RAM on Developers machine. We can install on 16 GB RAM machine as well but it would be very slow.
  • CPU should be quad or higher.
  • We should have 25-30 GB of disk space free.

Note: We should have high speed internet connectivity while installing Sitecore 10 on Dockers. It downloads data around 20 GB.

Network Requirement

Required PortRoleDescription
433TraefikHTTP Proxy
8079TraefikTraefik dashboard
8080TraefikHTTP proxy
8984SolrSolr API and dashboard
14330SQLSQL Server

Make sure the above ports are available to use in your machine.

Prepare your machine for Docker

Enable Hyper-V Windows Feature

http://www.tekkishare.com

Make sure Virtualization is enabled in your machine. You can check this task manager.

Docker Desktop Installation & Configuration

Install Docker Desktop for Windows. After installation of Docker, you will Docker icon available on the windows tray (at the right bottom corner).

Click on the Docker icon in Windows tray and select Switch to Windows Containers. It would take some time for switching. After that you are ready from Docker setting prospective.

Installation Preparation

To start with first thing is need to download the Container Deployment Package from Sitecore. Please make sure before downloading this package you have logged in on the Sitecore. You would find two folders when you extract the downloaded packages. You should be using ltsc2019.

Now you need to decide the Sitecore topology. Mostly developers use xp0 topology so I am taking this for this blog.

Prepare .env file

Inside the folder ltsc2019\sitecore-xp0, you can get .env file. It is an environment configuration for the container and Docker composer loads this file automatically while startup.

If you see the environment file, lots of information is missing like Sitecore admin password, SQL sa password, Sitecore license etc.

http://www.tekkishare.com

Sitecore provide a PowerShell script to fill these information automatically.In the downloaded PowerShell script just provide these two information:

  • Sitecore admin password (SitecoreAdminPassword)
  • SQL Server sa password (SqlSaPassword)

Execute the below command in the PowerShell before executing the init.ps1 scrip for smooth installation.

Set-ExecutionPolicy -Scope CurrentUser Unrestricted

Execute init.ps1 script in PowerShell (administrator mode)

Provide your Sitecore license files path while executing the init.ps1 file.

http://www.tekkishare.com

It would popup one message for installing certificate. You should click on Yes.

http://www.tekkishare.com

Now your .env file is ready to use. You can see all the missing information in the .env files now.

Sitecore 10 Installation on Docker

Execute below command on PowerShell (administrator) to download the Sitecore container image for Dockers and attaching those images in the local Docker.

docker-compose.exe up --detach

It would take around 40 minutes (depends on the internet speed) to complete. After completing you should see screen similar to this.

http://www.tekkishare.com

If you open the Docker dashboard, you can see all these images would be running conditions.

http://www.tekkishare.com

You can browse your Sitecore CM website now:

CM: https://xp0cm.localhost/sitecore/login

CD: https://xp0cm.localhost

http://www.tekkishare.com

http://www.tekkishare.com

Issues faced during installation and their fixes

http://www.tekkishare.com

I already had SOLR instance running on the port 8984. So I have stopped this service to fixe this issue and free 8984 port to use.

http://www.tekkishare.com

IIS was running on my local machine. So I have stopped the IIS and detach again.



References: