Setting up Sitecore Experience Edge Demo Site using Docker

While setting up the Demo edge application and as part of executing the up.ps1, I faced an issue with init container build and forced the CLI version (in C:\Sitecore.Demo.Edge\docker\build\init\dockerfile) as part of dotnet tool install! This might not be perfect but, got the application working!

A cursory diagram depicting relationship between docker override and individual dockerfiles in the build folder:


Docker file location:


Sitecore CLI version list:



Force CLI version as per the error:

RUN dotnet tool install --add-source=https://sitecore.myget.org/F/sc-packages/api/v3/index.json sitecore.cli --version 4.1.0



Retry up.ps1 to see the error gone!

Edge getting ready:


Much needed CLI push working:


Content tree:


Edge website:




Now, the general steps for  Edge Demo application setup:

Clone the Demo edge repo

the Demo edge repo provides  a wonderful readme

As per the readme:

npm install fails? 

Install nodejs

Restart PowerShell command prompt and run npm install:


Note: for website, npm install must be run in \Sitecore.Demo.Edge\Website\src\rendering

Wonderful Docker readme part of the repo:

One of the pre-requisites as per readme is Docker Experimental Features set to true:



Note that the init.ps1 doesn't have automatic iis stop capability, this can be added similar to Sitecore MVP Site:



Run the init.ps1 as specified in the readme:

.\init.ps1 -initenv -licensexmlpath "c:\license\license.xml" -adminpassword "b"

Then, run .\up.ps1




Init container error (the purpose of this blog article):

 ---> Running in 36212e9f7d9f
error NU1202: Package sitecore.cli 5.0.16 is not compatible with netcoreapp3.1 (.NETCoreApp,Version=v3.1) / any. Package sitecore.cli 5.0.16 supports: net6.0 (.NETCoreApp,Version=v6.0) / any
The tool package could not be restored.
Tool 'sitecore.cli' failed to install. This failure may have been caused by:

* You are attempting to install a preview release and did not use the --version option to specify the version.
* A package by this name was found, but it was not a .NET Core tool.
* The required NuGet feed cannot be accessed, perhaps because of an Internet connection problem.
* You mistyped the name of the tool.

For more reasons, including package naming enforcement, visit https://aka.ms/failure-installing-tool
The command 'cmd /S /C dotnet tool install --add-source=https://sitecore.myget.org/F/sc-packages/api/v3/index.json sitecore.cli' returned a non-zero code: 1
ERROR: Service 'init' failed to build : Build failed
C:\Sitecore.Demo.Edge\up.ps1 : Container build failed, see errors above.
At line:1 char:1
+ .\up.ps1
+ ~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,up.ps1




npm install Error:

PS C:\Sitecore.Demo.Edge\kiosk> npm install

npm : The term 'npm' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the

spelling of the name, or if a path was included, verify that the path is correct and try again.

At line:1 char:1

+ npm install

+ ~~~

    + CategoryInfo          : ObjectNotFound: (npm:String) [], CommandNotFoundException

    + FullyQualifiedErrorId : CommandNotFoundException

Comments