Previously, this blog covered running Sitecore on Windows Server using Docker. This time, we'll introduce the steps to launch Sitecore 10.2 XM version (CMS mode). Future content will be based on this article.
A list of previous articles is provided at the end of this page for reference.
Environment Preparation
For the demo environment we will be creating, we will proceed with the following environment, keeping in mind the actual development environment.
- Windows 11 Professional
- Visual Studio Code
- Git for Windows
- GitHub Desktop
- Docker for Windows
- NodeJs 14.x
- Visual Studio 2022
- .NET Core 3.1
- .NET Framework 4.8
In addition, 16GB of memory is a little insufficient for the environment. First, enable Hyper-V on Windows 11 Pro by running PowerShell with administrative privileges and executing the following command
Enable-WindowsOptionalFeature -Online -FeatureName $("Microsoft-Hyper-V", "Containers") -All
When the installation is complete, you will be prompted to reboot. Windows Subsystem for Linux must then also be installed.
wsl --install
Download the module from the following page and perform the installation.
The update is performed by executing the file downloaded from the page above.
Next, we would like to use chocolatey this time as an installer to install various tools.
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
The installation is completed and the version check is as follows.
Once the installation is complete, proceed with the installation on the command line as follows
Installing Visual Studio Code
choco install vscode
After installation is complete, add Japanese resources as extensions.
We will also add Docker extensions as they are useful to include.
Git for Windows
Install Git for Windows.
choco install git
GitHub Desktop
If you are used to working with git commands, that's fine, but we will be posting articles on this blog in a form that uses GitHub Desktop for its ease of use.
choco install github-desktop
During the installation process, the application will launch and ask if you want to log in with your GitHub account.
You may choose to skip this step, or you may log in with your GitHub account that you use daily.
Docker for Windows
Install Docker for Windows.
choco install docker-desktop
In order to start Docker Desktop, you must sign out and sign back in. After signing in again, you will be presented with a screen that asks for your permission to use the software.
When completed, the screen will switch to the startup screen.
Switch to Windows Containers. To switch, right-click the Docker icon in the task tray and select `Switch to Windows Containers`.
After switching, now right-click and click Settings to open the configuration. As for the action, select the Docker Engigne option and configure it as follows
{
"experimental": true
}
Finally, please uncheck the box regarding the Use Docker Compose V2 item on the configuration screen.
This completes the Docker for Windows configuration.
Installing mkcert
Install mkcert, a command used for self-certification, etc.
choco install mkcert
mkcert -install
Installing Node.js
Install Node.js, specifying the LTS version when installing Node.js.
choco install nodejs-lts
Installing Visual Studio 2022 Professional
Install Visual Studio 2022 Professional. Download the installer from the Microsoft website, install, and finally activate it to complete the process.
Install the Sitecore Docker Tool
A useful tool to assist with installation is the Sitecore Docker Tools, which can be downloaded from the Sitecore Gallery and installed by executing the following commands.
Register-PSRepository -Name "SitecoreGallery" -SourceLocation "https://sitecore.myget.org/F/sc-powershell/api/v2"
Install-Module SitecoreDockerTools
When confirmation comes at the command prompt, use Y or A to proceed.
Deployment of License File
Save the license file in the folder c:\projects\license
Summary
We have previously shown how to use Docker on Windows Server 2019, but as shown here, you can prepare an environment on Windows 10/11 Pro as long as you have a Hyper-V enabled machine.
Related article
- Set up the environment
- Running Sitecore with Docker - Part 1
- Running Sitecore with Docker - Part 2
- Running Sitecore 10 on Docker
- Running Sitecore 10 with Docker - XP1 and Domain Configuration
- Setting up a Docker environment on Windows Server