Docker with HTTPS
This repository provides an example on how to configure a website running in IIS hosted in Docker to make use of a certificate.
There are a few things to have in place when getting started. The
createcert.ps1 requires Windows PowerShell 5.1.
- Docker images built for use with the
docker-compose.yml. The version included assumes images built for Sitecore are used.
createcert.ps1is run on the workstation with elevated privileges. The files
cert.pfxare created in the startup directory and copied to the container on startup.
./createcert.ps1 -dnsNameList "*.dev.com"
./createcert.ps1 -dnsNameList "*.dev.com", "*.dev2.com", "*.devn.com"
If you wish to change the entrypoint script you can do the following:
entrypoint: powershell.exe -NoLogo -NoProfile -Command "& C:\\startup\\startup.ps1 -EntryPointScriptPath 'C:\\customtools\\Development.ps1'"
Set Volume (optional):
volumes: - .\customtools:C:\customtools
From your favorite console run the following command:
The "monitor" service is designed to edit the hosts file when a service spins up. In our case we want the host header for the custom website to be added. The example host header used in this repo is
- Certificate uses a wildcard
- Host header defined in the Docker compose file is