Skip to content
Build docker images for Sitecore
Dockerfile PowerShell Batchfile Shell
Branch: master
Clone or download
Latest commit 6289c15 Oct 21, 2019

Repository of Sitecore Docker images

License: MIT Repositories Tags Deprecated Dockerfiles Default version

Build your own Docker images for the most recent versions of Sitecore. See for all images currently available. You can also use this repository (preferably from a fork) from you own build server and have it build and push images to your own private Docker registry.

Jump to the How to use section to get started.


  • This repository was created to help consolidate efforts around Sitecore and Docker.
  • The code and examples found in this repository are created and maintained by the Community, unsupported by Sitecore.
  • Official statement from Sitecore on running in containers, see

Change Log

Please see

List of all images

Please see

Tagging and Windows versions

This repository can build multiple Windows versions. Read more about Windows Container Version Compatibility.

Here is the convention used for Sitecore image tags:


 \__________________/ \____________/ \___/ \____________________/
           |                 |         |             |
   registry/org/user    repository  sc version   os version

How to use

Quick start

.\Build.ps1 -SitecoreUsername "YOUR USERNAME" -SitecorePassword "YOUR PASSWORD"

This will:

  1. Download any missing packages into .\packages, if you have another location with files already present you can call Build.ps1 with the parameter -InstallSourcePath.
  2. Build all images of latest Sitecore version on latest LTSC (Long Term Support Channel) Windows version.

Images will always be saved locally but not pushed to any remote registries by default. See Setting up automated builds for details on how to do this.

When completed:

  1. Place your Sitecore license file at C:\license\license.xml, or override location using the environment variable LICENSE_PATH like so: $env:LICENSE_PATH="D:\my\sitecore\licenses"
  2. Then run any of the docker-compose files, for example an XM with: docker-compose --file .\windows\tests\9.x.x\docker-compose.xm.yml up

Setting up automated builds



  1. Latest Windows 10 or Windows Server 2019 with Hyper-V and Containers features installed.
  2. Latest stable Docker engine and cli.

Linux (optional)

  1. PowerShell Core so you can use the PowerShell module.
  2. Latest stable Docker engine and cli.

Configure your build server

  1. Trigger a build on changes to master - to get new versions.
  2. Trigger once a week - to get base images updated when Microsoft releases patched images.


# required, change if you need to build images in other folders such as ".\linux" or ".\legacy"
$imagesPath = (Join-Path $PSScriptRoot "\windows")

# optional, default value is ".\packages". Can be on local machine or a file share.
$installSourcePath = (Join-Path $PSScriptRoot "\packages")

# optional, on Docker Hub it's your username or organization, else it's the hostname of your
# own registry. This parameter is optional but you will not be able to push images to a
# remote registry without.
$registry = "YOUR REGISTRY NAME" `

# optional, default value is the latest Sitecore version on latest LTSC version
# of Windows. Set to for example "*" for build everything or "*:9.1.1*1903", "*:9.2.0*1903" to
# only build 9.1.1 and 9.2.0 on Windows 1903.
$tags = "*"

# required
$sitecoreUsername = "YOUR USERNAME"

# required
$sitecorePassword = "YOUR PASSWORD"

# import builder module
Import-Module (Join-Path $PSScriptRoot "\modules\SitecoreImageBuilder") -Force

# restore packages needed for the build, only files missing in $installSourcePath will be downloaded
SitecoreImageBuilder\Invoke-PackageRestore `
    -Path $imagesPath `
    -Destination $installSourcePath `
    -Tags $tags `
    -SitecoreUsername $sitecoreUsername `
    -SitecorePassword $sitecorePassword

# build and push images
SitecoreImageBuilder\Invoke-Build `
    -Path $imagesPath `
    -InstallSourcePath $installSourcePath `
    -Registry $registry `
    -Tags $tags
You can’t perform that action at this time.