I would like to set up a demo environment using the source code of Sitecore.Demo.Platform, which is a demo environment for Sitecore. We will assume that you have already set up a Docker environment on a Windows Server.
![](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F5udN3TdAnf30g49QPvjYkb%2F56a74a80a6fe0047879c1f6993340a7a%2Fdocker09.png&w=3840&q=75)
Preparing for Setup
First, you need to clone the repository. The following URL is the target repository
This time we will prepare a clone of the repository at c:\projects\sitecore.demo.platform Go to C:\projects and execute the following command
git clone https://github.com/Sitecore/Sitecore.Demo.Platform.git
![git01.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F7JGZ90igNN8n9EAoHCmIC7%2F6d8b07c0da00e5b2f7905a54d86dce6a%2Fgit01.png&w=3840&q=75)
Also copy the license file to be used to the folder c:\licence
- c:\licence\licence.xml
This completes the preparation.
Deploying a Demonstration Environment
Normally, you would need to install SitecoreDockerTools, which is useful for deploying with Docker, and run scripts to adapt the license file to your environment, but the cloned repository has a script called init.ps1 that allows you to change the configuration at once You can change the configuration in one go.
First, go to the directory from which you copied the repository and execute the following command. If you have a license file in a different path than this one, rewrite it and execute the command.
.\init.ps1 -InitEnv -LicenseXmlPath C:\license\license.xml -AdminPassword b
![docker05.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F3IoKmLWdkGg4ujwR1IbuPX%2Fc75097f3cdffd72dbced5aa80540d32a%2Fdocker05.png&w=3840&q=75)
On the way to execute the mkcert command, a dialog box will appear. This time, click Yes. After a few moments, the script execution will be complete.
This completes the basic setup for launching the demo environment.
We will now proceed with the steps related to Docker. First, download the Docker image.
docker-compose pull
![docker07.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F3DViWG5xGnztIA9wpiRuki%2F068c254a50284ed592ee7d89c8005a76%2Fdocker07.png&w=3840&q=75)
If an error occurs, you can still complete the process by running pull again.
Then, start the container. The following command will run the container.
docker-compose up -d
If an error occurs, all containers will still work by running it again.
![docker08.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2FwTbFRVgTIvIPkeSIpkcx9%2Fac5f75a88c3da157b81512059513f448%2Fdocker08.png&w=3840&q=75)
For initial startup, it will take some time to import the data. Please check the status of the import with the following command.
docker-compose logs -f init
When the following line appears at the end, the import is complete.
init_1 | 3/3/2021 9:02:51 AM No jobs are running. Monitoring stopped.
![docker09.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F5udN3TdAnf30g49QPvjYkb%2F56a74a80a6fe0047879c1f6993340a7a%2Fdocker09.png&w=3840&q=75)
Accessing the Demo Environment
The URL of the web site is as follows by default The password to login to the cm server is the password set in init.ps1.
- https://cd.lighthouse.localhost
- https://cm.lighthouse.localhost/sitecore
![docker10.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F4QlGsMc0siruv6trZP3YPQ%2Fe91b2da74b7cff8af5571b0bd6804112%2Fdocker10.png&w=3840&q=75)
![docker11.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F4Gpi3iomyF3RjDV534pxBU%2Fa22aa96d09fadebb475ee2f60ee92920%2Fdocker11.png&w=3840&q=75)
This time, you can see that the CD server and CM server are set up in a separate configuration.
Summary
The use of Docker allows for downloading and then deploying images to eliminate the various installation steps. In this case, we were able to run Sitecore in a configuration where CD and CM were separated, SQL Server was also started up, and so on, in multiple instance.
Additional information
The procedure for converting the demo environment to Japanese is described in a separate article. Please refer to it.