Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
How to configure Unicorn with a volume mapping for your CM server Docker container
image: sitecore-xp-sxa-1.9.0-standalone:9.2.0-windowsservercore-${WINDOWSSERVERCORE_CHANNEL}
entrypoint: cmd /c "start /B powershell Watch-Directory C:/src C:/inetpub/sc & C:\\remote_debugger\\x64\\msvsmon.exe /noauth /anyuser /silent /nostatus /noclrwarn /nosecuritywarn /nofirewallwarn /nowowwarn /timeout:2147483646"
- C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\Remote Debugger:C:\remote_debugger:ro
- .\deploy:C:\src
- .\unicorn:C:\unicorn
- .\data\cm:C:\inetpub\sc\App_Data\logs
- .\data\creativeexchange:C:\inetpub\sc\App_Data\packages\CreativeExchange\FileStorage
- "44001:80"
- sql
- solr
- xconnect
Only this part is relevant to Unicorn. It will map your solutionroot/unicorn to C:\unicorn in the container
- .\unicorn:C:\unicorn
How to set up Unicorn in your Docker container
Since all writing to Unicorn files happens inside the container, and the container is now linked to .\unicorn,
all you need to do is ensure that .\unicorn is included under source control.
This gets even better if you use Transparent Sync.
Place this in App_Config/Include/z.Unicorn
<configuration xmlns:patch="">
<patch:attribute name="physicalRootPath">c:\unicorn\$(configurationName)</patch:attribute>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment