top of page
  • Writer's pictureGowtham

Building a Sitecore Solution from Scratch with Docker: Part 1

Updated: May 18, 2023

As I began to learn Sitecore Docker, I utilized the Sitecore Custom Images Docker for customization. However, I often found myself pondering on how to build a Sitecore Docker solution from scratch. Despite scouring various online resources for information on this topic, I found that the information provided was insufficient or lacked detail. As a result, I decided to conduct a more in-depth investigation and share my findings through a blog series. This series of blog posts will guide you through the process of creating a Sitecore Docker solution from scratch and provide you with a comprehensive understanding of the steps involved.


To clarify, when I mention starting from scratch, I won't be providing instructions on how to set up your instance for installing Docker or preparing your local instance for Sitecore Docker. There are already plenty of resources available on the internet for these steps and the official one you can find it here.


Let's get started by cloning the docker-examples git repository from Sitecore and using the "getting-started" template to install a vanilla instance of Sitecore.


I'm creating a folder named SitecoreDocker and transferring the files from the getting-started folder, which is the folder we originally cloned from.


getting-started-files
These are the files for the Sitecore Getting Started template.

Please make sure to check that none of your resources are currently using the ports listed in this document and also ensure that IIS on your local machine is stopped before we begin.


Open PowerShell and go to the SitecoreDocker folder. Then, execute the following command.

.\init.ps1 -LicenseXmlPath "<your licensepath here>"

The command above will fill in the variables in the .env file with their respective values.

init_ps1
Running the .\init.ps1 -LicenseXmlPath C:\License\license.xml

If the above command has executed successfully, it's time to start the Docker instance. Run the following command in your terminal window.

docker-compose up -d 

Please note that the command above may take a while to download and start the instance, depending on your network speed and system resources. Once it's complete, you can view the Sitecore XP0 instance by browsing to this URL: https://xp0cm.localhost/sitecore

xp0-website
xp0-website

In our next blog, I'll guide you through modifying the folder structure in accordance with Sitecore's recommended practices, as well as adding modules such as SXA and SPE to the basic Sitecore instance.

225 views0 comments
bottom of page