5

I'd like to build a continuous delivery pipeline for SC 9.0.1 instance using Docker.

In order to do so any file changes on CM/CD should be deployed in a new container. I'm just wondering, how to deliver item changes to the instances?

3

A new Docker image must be created. This new image will inherit Sitecore base images.

You may have different Dockerfile files for different purposes. One could be for debugging and other could be for release.

By using Docker-Compose you can define an environment with a MSSQL container, another Solr container and a Sitecore website container along with the dependencies among them.

Visual Studio 2017, with its OOTB Docker support, can help a lot.

Please find next a link to an example:

https://github.com/Sitecore/docker-demo/tree/master/sitecore/9.0.1%20rev.%20171219%20XM1/VS2017/SimpleSample

The steps to create a development environment with the provided sample are as follow:

  1. Clone the Sitecore Docker Images repository
  2. Build all images for "Sitecore 9.0.1 rev. 171219 XM1". Detailed steps provided with the repository.
  3. Clone the Sitecore Docker Demo repository into a folder such as “c:\Docker\Sitecore\docker-demo” (next steps will asume this folder has been used):
  4. Copy "license.xml" into "C:\Docker\Sitecore\docker-demo\sitecore\9.0.1 rev. 171219 XM1\VS2017\SimpleSample\storage\Data
  5. Open VS2017 as Administrator
  6. Open the solution “C:\Docker\Sitecore\docker-demo\sitecore\9.0.1 rev. 171219 XM1\VS2017\SimpleSample\SimpleSample.sln
  7. Make sure the project “docker-compose” is set as StartUp project
  8. Build the solution. The two projects in the solution should compile.
  9. Review the files "Website\Dockerfile" and "Website\build.Dockerfile" and update the FROM clause with the name used to build the base images.
  10. Build the solution with “Debug” configuration ("F5").

    The first time the containers run, the base images will detect that the required assets (databases, indexes and site files) are missing in their respected VOLUMEs (pointing to the development environment) and will take some time to create them. VS will build the containers and will try to attach to the IIS's process running in website's container, however it will fail (TODO: fix this known issue). In the meantime, the file transfer from the images to the Development environment will keep progresing. Please be patient.

  11. Copy the website's container’s IP from the VS' "Output" panel (make sure it is the "Docker" output) and paste the IP on a browser's address bar. Please notice that Sitecore needs some time to warm-up, therefore the initial start may take a bit (up to 1-2 min).
  12. The browser will display the OOTB Sitecore’s home page.
  13. Any change made to the following folder will be automatically detected by sitecore "C:\Docker\Sitecore\docker-demo\sitecore\9.0.1 rev. 171219 XM1\VS2017\SimpleSample\storage\Website
0

For item changes, we use include the serialized files in the docker images (we are using Unicorn) and we have another image/container that invokes syncronization when the CM container is reachable

  • You should really add some more information. This is rather a comment. – Marek Musielak Aug 20 at 8:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.