Setting up Sitecore 10.2 Lighthouse demo on Windows 11 machine + the misleading "linux" cannot be used on this platform error
Although there are many blog articles detailing how to setup the Sitecore lighthouse demo, I ventured on my own to set one up since I saw a scope to encounter error(s) and blog solution(s) as a result. In this case, one main and misleading error was image operating system "linux" cannot be used on this platform. Although I already had switched to windows container, this error seemed unrelenting. After a lot of trial and error, I realised the solution for this error is to set experimental flag (under Settings -> Docker Engine) to true.
Unfortunately, there was no direct web result for this particular error. Let me know if you find one! So, decided to document this error along with the solution. Note that it is amazing that many blogs talk about setting experimental feature to true while setting up the Sitecore lighthouse demo site but not, the error(s) thrown if not setting the flag!
1. Edit the daemon.json under %ProgramData%\Docker\config,
Then, restart the Docker service:
Both Windows services must be running:
2. Or, Edit the experimental value to make it true in the below screen. Note that the text area in this screen is editable but misleading since it has a grey background! Double click and you should be able to edit and then Apply & Restart button will be enabled, poor grey colour choice in my opinion but you might call it intuitive design!
Linux error goes off once experimental feature is set to true:
If you want to use PowerShell to set experimental to true then restart the docker service for the flag to take effect:
Set-Content -Value "`{`"experimental`":true`}" -Path C:\ProgramData\docker\config\daemon.json
restart-service docker
restart-service com.docker.service
-------------------------------------------------------------------------------------------------------------
Now, let's cover the formality of setting up the lighthouse site:
Pre-requisites:
Clone this repo
Copy Sitecore license file to c:\license folder
Initialise env variables with this PowerShell command: .\init.ps1 -InitEnv -LicenseXmlPath "c:\license\license.xml" -AdminPassword "b"
Successfully completed:
This is how my .env file looks after the above execution:
End-result:
Ensure to use the username specified in the override file while logging into the cm instance:
Now, a list of all the scenarios/errors here below expecting experimental flag to be true
---------------------------------------------------------------------------------------------------------------
Scenario-1:
docker pull mcr.microsoft.com/mssql/server:2019-latest
2019-latest: Pulling from mssql/server
ERROR: image operating system "linux" cannot be used on this platform
Solution attempted: As stated in Stackoverflow, already switched to Windows Container but still the above error was thrown. Restarted the computer and checked without much effect.
Scenario-2: docker-compose up -d for Sitecore 10.2 lighthouse on Windows 11
PS C:\projects\Sitecore.Demo.Platform> docker-compose up -d
Pulling smtp (maildev/maildev:)...
latest: Pulling from maildev/maildev
ERROR: no matching manifest for windows/amd64 10.0.22000 in the manifest list entries
Running 0/16
- cd Error 3.5s
- cm Error 3.5s
- id Error 3.5s
- ps Error 3.5s
- xconnect Error 3.5s
- mssql Pulling 3.5s
- authoringhost Error 3.5s
- mssql-init Error 3.5s
- init Error 3.5s
- solr-init Error 3.5s
- tenantservice Error 3.5s
- traefik Error 3.5s
- smtp Error 3.5s
- xdbautomationworker Error 3.5s
- xdbsearchworker Error 3.5s
- ps-init Error 3.5s
image operating system "linux" cannot be used on this platform
Solution attempted: Already switched to Windows Container but still the above error was thrown. Restarted the computer and checked without much effect.
Error:
error during connect: In the default daemon configuration on Windows, the docker client must be run with elevated privileges to connect.: Get "http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/containers/json?all=1&filters=%7B%22label%22%3A%7B%22com.docker.compose.project%3Dsitecore-xp0%22%3Atrue%7D%7D&limit=0": open //./pipe/docker_engine: The system cannot find the file specified.
Solution:
This one is different! Ensure Docker Desktop is running and you are logged in to Docker Desktop
Comments
Post a Comment