Awesome
Sitecore Docker Tools
Sitecore Docker Tools are utilities which improve developer experience when running Sitecore in a Docker environment. This includes:
sitecore-docker-tools-assets
, a Docker image with development scripts and entrypoints which can be used during Sitecore container builds.
SitecoreDockerTools
, a PowerShell module with functions used on the Sitecore container host to initialize the Sitecore Docker environment.
Usage
Released versions of these utilities can be found on the Sitecore Container Registry and the Sitecore PowerShell Gallery. Usage details can be found in the Sitecore container development documentation.
Docker Image
The scripts found in the Docker image are intended to be copied in via your custom Dockerfile
.
FROM ${TOOLS_IMAGE} as tools
FROM ${PARENT_IMAGE}
COPY --from=tools C:\tools C:\tools
You can enable the development entrypoint in your docker-compose
override.
entrypoint: powershell.exe -Command "& C:\tools\entrypoints\iis\Development.ps1"
The development entrypoint also enables the application of development-specific configuration patches and configuration transforms at runtime via the SITECORE_DEVELOPMENT_PATCHES
environment variable. You can see available patches here.
environment:
SITECORE_DEVELOPMENT_PATCHES: DevEnvOn,CustomErrorsOff,DebugOn,DiagnosticsOff,InitMessagesOff,RobotDetectionOff
PowerShell Module
The PowerShell module can be installed and imported from the Sitecore PowerShell Gallery.
Register-PSRepository -Name SitecoreGallery -SourceLocation https://nuget.sitecore.com/resources/v2/
Install-Module SitecoreDockerTools
Import-Module SitecoreDockerTools
# See available commands
Get-Command -Module SitecoreDockerTools
Building/Using from Source
Docker Image
cd image\src
docker-compose build
PowerShell Module
Import-Module .\powershell\src\SitecoreDockerTools.psd1
Running Tests
Unit tests require use of Pester v4.
From the root folder of either project:
Import-Module Pester -RequiredVersion 4.9.0
Invoke-Pester -Path .\test\*