Example of a simple Sitecore solution configured to be deployed, during development, to a docker instance.
As Sitecore does not provide a set of docker images you need to first build them using the instructions in the sitecore-docker repo.
-
Open the solution in Visual Studio and invoke the publish operation on the SampleSite project. This will build the project and output its content to the
.artifacts
folder. -
Create the folders
.logs\sitecore
and.logs\xconnect
in the root of the solution. -
Invoke
docker-compose up -d
. This will bring Sitecore up, the files from the.artifacts
folder are copied to the webroot of Sitecore. Logs are output in the.logs
folder. -
Sitecore should be available under
http://sitecore/
. -
If you are using Unicorn, you don't need to change the default serialization folder. Serialized items are picked from the
serialization
folder. Open thehttp://sitecore/unicorn.aspx
page and either serialize or sync. -
When you no longer need Sitecore running, you can do
docker-compose stop
to stop all the containers, but maintain their state. -
If at any point you need to remove the Sitecore instance simply do a
docker-compose down
. You can always deploy again from scratch invokingdocker-compose up -d
again.
- Debugging is not yet available
- Windows containers are quite resource intensive. Adjust the cpu_count and memory values in the
docker-compose.yml
file if necessary. Eventually SOLR and MSSQL should be moved to Linux containers. - Sitecore Rocks is not enabled by default. You need to copy the files to the root of sitecore. You could temporarily place them in the
.artifacts
folder for them to get copied to the site root.