Sitecore and Docker, end to end example
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
images support for latest docker/compose Dec 2, 2016
src/WebApp added remote debugger Nov 6, 2016
.gitattributes first Oct 30, 2016
Build.ps1 Update Dec 18, 2017
nuget.config first Oct 30, 2016

This is an outdated repo, please go to or

Socker = Sitecore ❤️ Docker

Is is now possible to run Sitecore completely in Docker natively, you don't have to mess around with databases, IIS or anything, you don't even have to have SQL Server or IIS installed on your machine.

This repository shows how a solution running Sitecore is wired up for development with the following features:

  • Databases is persisted between restarts
  • Serialized items are also persisted
  • Project output are automatically synced into running containers when changes are detected
  • Remote debugging
  • Streaming log output
  • Load balancing multiple Sitecore instances


Using your local machine as host


Using a remote host (VM, bare iron, Azure, AWS etc.)

  • Docker v1.12.3 or later
  • Docker Compose v1.9.0 or later


NOTE: Base images are build and consumed locally in this example, but in a real life senario you would also push to an remote private repository like, or an internal one, so that images can be shared within your organization. Unfortunately it has to be private repositories due to Sitecore licensing terms so we can't share images in the community.

Using Sitecore v8.1 rev. 160519

  1. Copy Sitecore 8.1 rev. into "/images/sitecore-81rev160519"

  2. Build private images:

    docker build -t sitecore-iis .\images\sitecore-iis
    docker build -t sitecore:8.1.160519 .\images\sitecore-81rev160519
  3. Copy license.xml into "/docker/web/Sitecore/Data"

  4. Copy database files from Sitecore 8.1 rev. into "/docker/databases"

Daily usage

Start containers

docker-compose build
docker-compose up

If you do not care about the output from containers you can start in "detached" mode with docker-compose up -d and then use docker-compose stop or docker-compose down to remove everything.

Open solution

  • Build
  • Browse the IP of web container (IP is in the compose output or use docker inspect).
  • Add files, edit code, build - watcher script updates the running containers...
    • Refresh browser, repeat...


You can attach to a container to watch output from Sitecore:

docker exec socker_web_1 powershell C:/Sitecore/Scripts/Stream-Log.ps1


  1. Open Debug -> Attach to Process
  2. Click Find and select container under Auto detected
  3. Select the w3wp.exe process
  4. Click Attach


Using another Sitecore version

  1. Copy Sitecore 8.2 rev. into "/images/sitecore-82rev160729"

  2. Build private image:

    docker build -t sitecore:8.2.160729 .\images\sitecore-82rev160729
  3. Change the version number in the FROM statement in "/docker/web/Dockerfile"

  4. Replace "/src/WebApp/Web.config" with the Web.config from Sitecore 8.2 rev.

  5. Update the package Sitecore.Kernel.NoReferences to 8.2.160729 int the WebApp project

  6. Copy database files from Sitecore 8.2 rev. into "/docker/databases"

Multiple Sitecore instances, load balanced

If you want to try out an loadbalanced environment you should also build for Windows with:

docker build -t traefik:win .\images\traefik-win

You can then use docker-compose --file .\docker-compose.scale.yml up to start your containers.