Now that we have docker installed, let’s switch it to use windows containers and verify the installation before we proceed.
On the Docker whale in the task panel, right click to show the context menu. You should see, “Switch to Windows containers” as an option. Click that to switch to windows. If you see “Switch to Linux containers”, that means you are already running Windows containers and are all good.
Verify you are running windows by opening a command prompt and typing “docker version”. You should see windows as the client and server OS/Arch.
Now that we are up and running with the correct OS, let’s get the first Sitecore Image running.
Clone the Sitecore Docker examples repository
- Create a directory on your folder to store the clones. I used “D:\sitecore\docker-examples”
- Go to https://github.com/Sitecore/docker-examples
- Click Code -> then the “Copy” icon
4. Open Git Bash, change the working directory to the directory you want to use to store the docker-examples, paste the url to clone from Git and hit enter.
5. Open powershell and navigate to the getting-started folder.
docker-compose.yml and the .env files are types of Docker Compose files and are required for launching the vanilla Sitecore instance.
The mssql-date, solr-data, and traefik folders are supporting folders used by Docker containers.
6. Run the .init.ps1 file located in docker-examples/getting-started
I appreciate the ascii art.
You’ll notice that when that .env file located in this directory is updated when this process completes.
sitecore\docker-examples\getting-started
7. Run docker-compose up -d, be sure to be in the getting started directory.
Lots of activity is happening now.
I did get errors after running this.
What solved this issue was to simply run these commands
- docker-compose stop
- docker-compose down
- iisreset /stop
- docker-compose up -d
I actually had to run through these steps a couple of times until all the containers started successfully.
Here is the result
And it’s up. Success!