Assurex's Sandeep and Saurabh are recognised as Sitecore Most Valueable Professionals Find out more         
Docker-Sitecore
Development Get It Right Quick Tips Sitecore Tips & Tricks

Step-by-step – install Sitecore XP 10 on developer workstation using Sitecore Containers with Docker Compose

One of the highlights of the newly released Sitecore Experience Platform (10.0) is that it brings support for rapid deployment and more efficient solution and team onboarding with modern Docker technology i.e. Sitecore Containers.

If you want to know more about containers, here is the documentation provided by Sitecore Containers

Let’s get started to create a Sitecore XP 10 development environment using docker.

Before getting started please see Installation Guide for Developer Workstation with Containers

Topology used

Topology user here will XP0 or per guide XP Workstation (XP Single)

Hardware and Networking Requirements-

Developer workstation requires 32GB RAM and 25 GB Free space with quad-core or higher CPU

Required port Role Description
433 443 Traefik HTTPS proxy
8079 Traefik Traefik dashboard
8080 Traefik HTTP proxy
8984 Solr Solr API and dashboard
14330 SQL SQL Server

IMPORTANT-

HTTPS proxy port for Traefik in the guide is incorrect. As per the docker-compose.yml the Traefik is set to listen on 443 port and not 433.

Prepare Sitecore XP workstation

  • OS – Windows 10 1809 or later or Windows Server 1809 or later
  • Login to Azure portal to create a VM
  • Image – Select Image to Windows 10 Pro, Version 1809- Gen 1
  • Size – Standard_D8s_v3- * vcpus, 32GiB memory
  • Inbound ports– Select RDP, don’t select HTTPS 443 as this will be used by Traefik as mentioned in the previous section

Download and Install Docker Desktop for Windows

  • Setup should enable Hyper-V Windows Features
  • Once installed, restart the machine, this should enable the Hyper-V windows feature
  • You should have docker running – look in the system tray
  • Switch to Windows containers
    • Right-click on the Docker icon and switch to Windows Container. See this link for more details.

Now to the installation

  • Download and Prepare for installation
    Download and extract the Sitecore Container Deployment Package from the Sitecore Developer Portal and store it on your local workstation
  • Login to Sitecore portal before download
  • Copy and extract SitecoreContainerDeployment 10.0.0 rev. 004346-027.zip for e.g:- C:SitecoreXPDocker

Navigate to C:SitecoreXPDockerltsc2019sitecore-xp0

  • Open .env file, we need to fill in the parameters before starting installation.
  • Download PowerShell script to initialize (init.ps1) the parameters from docker-examples. Parameter values in .env can be populated manually by individually executing the commands required for each parameter in the guide(see Appendices) but I would recommend using init.ps1 as this is provided by Sitecore and hence tried and tested.
  • The folder structure should look like this
  • Change parameter values in init.ps1 file.
  • Change the SitecoreAdminPassword, SqlSaPassword, and host entries as per requirement.
  • If you are changing host entries also ensure the same is updated in .env file for CM_HOST and ID_HOST parameters.
  • Populate .env file using init command

Execute the scripts

  • Open PowerShell as Administrator, navigate to the folder having init.ps1 file.
  • Execute init.ps1 script. You may have to set the execution rights to the current user to execute the script-
Set-ExecutionPolicy -Scope CurrentUser Unrestricted
.init.ps1
  • Provide the path of the license file
  • This should Install and Import SitecoreDockerTools and Populate the environment file.
  • Ensure to Switch to Windows Container before executing below command

Installation

Execute docker-compose command

docker-compose.exe up --detach

And done

  • The scripts should run for 20 mins and instance should be ready to use.
  • Open Docker Dashboard and should see Sitecore-XP0 running

Cleanup the workstation

To cleanup/stop workstation use following commands.

  • To stop a Docker Compose environment without removing its contents:
docker-compose.exe stop
  • To resume a previously stopped Docker Compose environment:
docker-compose.exe start
  • To remove a Docker Compose environment and all the non-mounted volumes
docker-compose.exe down

This is by far the quickest way to install get started with Sitecore XP. Next…Sitecore Commerce

If you need support with setting up your environments, why not look at our Assure.Ops service.

Did you find this useful? If so, please share with your connections.

2 thoughts on “Step-by-step – install Sitecore XP 10 on developer workstation using Sitecore Containers with Docker Compose”

  1. I did all the steps as mentioned above and all the containers seems to be running as expected. I am able to access solr as well as SQL. But when I tried to hit https://xp0cm.localhost/ I am getting 404 error with Certificate – missing
    This site is missing a valid, trusted certificate (net::ERR_CERT_COMMON_NAME_INVALID). kindly help me out. it’s screwing me!

    1. If the DNS name doesn’t match the host entry name, you might receive the certificate invalid error. In init.ps1 file check domain name in Add-HostEntry matches to the domain name whilst creating a certificate i.e. $mkcert. Alternatively also check if the CM_HOST and ID_HOST is correctly entered in .env file.

Leave a Reply

Your email address will not be published. Required fields are marked *