docker

Playing around with the set-up of Sitecore Docker Images

Since September 2019 (09/2019), Sitecore has officially supported running in containers so it’s a good chance for me to play around with Sitecore Docker – an awesome contribution for the Sitecore community by Per Manniche Bering and other contributors.

Personally, I enjoy reading and following the great articles below by Mark Cassidy as they’re very fun and helpful for my own journey as a Docker newbie 😀

I’ve just purchased a brand new laptop so hopefully I don’t need to install a bulk of software products before launching a Sitecore 9.2 XP instance as usual 😀

Prerequisites

Step-by-step Set Up

  1. update Windows 10 to latest version if not yet
  2. enable Hyper-V + Containers features in Windows and Intel Virtualization (Intel VT) in BIOS if not yet
  3. do following things so we can play around with command-line much easier
    • install chocolatey
    • open Windows PowerShell (run as administrator) and then execute Set-ExecutionPolicy -Scope CurrentUser Unrestricted
    • sc9_14
  4. install Docker Desktop and Git for Windows Setup
    • open Windows PowerShell (run as administrator)
    • execute choco install docker-desktop -y
    • dk_1
    • execute choco install git
    • dk_2
  5. restart Windows, otherwise will see this error message later “The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.”
    • dk_6
  6. ensure using Windows container by navigating to System Tray of Windows taskbar and then clicking on Docker icon + “Switch to Windows containers…” context menu
    • dk_7
    • otherwise will see this error message later “no matching manifest for linux/amd64 in the manifest list entries”
    • dk_8
  7. create a new folder, let’s say D:\ScDocker
  8. clone or download the git repo from Sitecore Docker images
  9. let’s build latest image of Sitecore version on latest LTSC (Long Term Support Channel) Windows version
    • Note: at this moment, the latest Sitecore version is 9.2 and we can use –Tags parameter to build image of other versions as well by editing Build.ps1 file
      • dk_9
    • open Windows PowerShell (run as administrator)
    • change directory to D:\ScDocker\docker-images
    • execute .\build and then enter username / password of your Sitecore certified account on Sitecore Downloads
    • dk_4
    • (optional) in D:\ScDocker\docker-images, create packages folder manually and then copy / paste all the following Sitecore packages are compatible with 9.2 version to “D:\ScDocker\docker-images\packages” folder
    • dk_5
    • hopefully will see something like this after a loooooooooooog operation
    • dk_10
  10. ensure that this file C:\license\license.xml is available, otherwise will see this error message later License not found at ‘C:\license\license.xml'”
    • dk_19
  11. let’s spin up Sitecore instances
    • open Windows PowerShell (run as administrator)
    • change directory to D:\ScDocker\docker-images\windows\tests\9.x.x
    • execute docker-compose -f docker-compose.xp.yml up
    • dk_11
  12. let’s see how many containers and their own info
    • open Windows PowerShell (run as administrator)
    • execute docker container ls
    • dk_12.png
    • have a look at the docker image sitecore-xp-standalone:9.2.0-windowsservercore-ltsc20 and then note its port (it should be 44001)
  13. open a browser, navigate to http://localhost:44001/
    • dk_13
  14. log into Sitecore (admin / b) and then verify the following ones:
    • This slideshow requires JavaScript.

       

Note: take a look at the following steps to shutdown all the containers

  • open Windows PowerShell (run as administrator)
  • change directory to D:\ScDocker\docker-images\windows\tests\9.x.x
  • execute docker-compose -f docker-compose.xp.yml down
  • dk_18

 

Happy Sitecore Docker!

 

One thought on “Playing around with the set-up of Sitecore Docker Images

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.