Sitecore Docker Compose Up

I was trying to get few of my experiments on Sitecore this afternoon, and spent a lot of time getting the Sitecore Docker Instance running on the lowest of Memories on an Oracle Virtual Box, Windows 10 VM, yes with 16GB RAM. This has been pending since I always got into issues running this. I thought may be it is Mac, or may be it is the 16GB or something else. And kept this project pending. So much for waiting. I thought this has to happen today. So I solved this issue. Hope this will be helpful to few of you.

The bare necessities to run Sitecore is the “License”, we cannot avoid that part. I always thought this was set (configured) properly. Found out that was not the case. I was under the impression that the content of the file when passed to the “compose-init.ps1” and it will run as expected when we pass in the file plain. Like below

.\compose-init.ps1 -LicenseXmlPath "C:\License\license.xml"

The Problem

This command execution just worked find, but when I started the instance “docker-compose up -d” will not work.

Yes, I did all the following

iisreset /stop
docker-compose stop
docker-compose down
docker-compose up -d

But the situation continued, traefik fails, so did a deep dive on to the logs to see what did happen. Try the right-click on the running docker instance in question like below, since Visual Studio Code makes it convenient

Visual Studio Code with Docker Extensions (very hand)

Learnt that the exceptions were thrown related with License, this was easy to fix. So made sure the files are in place, opened the file to view the content and everything was fine.

Run the “docker-compose up -d” again, nope. Same result.

Solution

This is how it is done and it worked for me

Set-DockerComposeEnvFileVariable "SITECORE_LICENSE" -Value (ConvertTo-CompressedBase64String -Path "C:\License\license.xml")

Read the Sitecore Link for more details. But I noticed that the “.env” file never got updated, however this worked for me. And no more traefik issues. Instances are running the successfully.

Happy Coding, Sitecore on Docker is the fun and all of us need to have this handy for any tests and development ofcourse.

Success on PowerShell

Visual Studio Code Extension for Docker is the best. I have been using this long enough and I recommend you all to use too.

All Green, but I am yet to find the solution for those small red squares

References

  1. Sitecore Docker Tools

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *