Sitecore 2021 VDD Session: Deploying Your Sitecore Helix Solution to Docker Using MSBuild

Points from Shelley Benhoff's session:

Started with local deployment process in Docker

1. Used Github Docker Getting Started example:

Sitecore 10 CM image:

data cm folder: docker file location, log files will be copied here, shared volume 

deploy folder: where you publish code from vs sln

docker build\cm: Base image +  customizations

.env file

Don't touch docker compose file: since this has info abt base images

create an override instead has

cm service -  has following sections:

build section

volumes section

entry point run a ps1 script

then docker-compose up

Go to VS and setup project for local deployment:

- Create publish profile to deploy to local folder

Since code is compiled to local deploy webroot folder

Check file system within container to check deployment

c:\tools\entrypoints\iis\development.ps1

used to do local deploys

c:\deploy has the files to be deployed

all contents from VS will be deployed to c:\deploy first


2. In case of CI system, need more headless and automated process

Containerize the build process

Control build deploy in your solution

Leverage Docker Builder Pattern

- 2 docker images

Optimized size thru this approach

Without builder pattern the size of image produced will be very large

Multi-stage builds: Give all benefits of builder pattern without maintaining separate docker files

Full control over built env

Portable containers

Docker file:

Base image and build image as args


docker exec  command

docker images to list all images

Separate build and run images is the advantage of multi stage builds

Shelley's Pluralsight courses:



Comments

Popular Posts