An entrypoint process for running IIS in Windows containers
Перейти к файлу
Sujit Nayak 1c4153056f update iis.common to latest 2023-02-01 19:00:08 -08:00
.github Update CODEOWNERS 2019-05-07 15:16:05 -07:00
.pipelines Update servicemonitor for building with VS2022. 2023-02-01 11:11:19 -08:00
IIS.Common@551bf70acf update iis.common to latest 2023-02-01 19:00:08 -08:00
build Update yaml build pipeline to use IISCommon build templates 2019-12-04 15:44:56 -08:00
src/ServiceMonitor Update servicemonitor for building with VS2022. 2023-02-01 11:11:19 -08:00
.gitignore Initial commit 2017-07-13 11:29:41 -07:00
.gitmodules Update yaml build pipeline to use IISCommon build templates 2019-12-04 15:44:56 -08:00
Directory.Build.props Update yaml build pipeline to use IISCommon build templates 2019-12-04 15:44:56 -08:00
LICENSE Initial commit 2017-07-13 11:29:54 -07:00
NuGet.config Update servicemonitor for building with VS2022. 2023-02-01 11:11:19 -08:00
README.md Replace GitHub links with Docker Hub (#78) 2021-06-10 11:51:17 -07:00
SECURITY.md Microsoft mandatory file 2022-08-30 09:39:32 +00:00
ServiceMonitor.sln Add solution file 2017-07-19 18:06:24 -07:00
azure-pipelines.yml Set up CI with Azure Pipelines 2019-05-03 16:53:12 -07:00
build.cmd Add solution file 2017-07-19 18:06:24 -07:00
root.props Update yaml build pipeline to use IISCommon build templates 2019-12-04 15:44:56 -08:00
sign.props Add microbuild 2017-08-21 11:33:14 -07:00

README.md

Microsoft IIS Service Monitor

ServiceMonitor is a Windows executable designed to be used as the entrypoint process when running IIS inside a Windows Server container.

ServiceMonitor monitors the status of the w3svc service and will exit when the service state changes from SERVICE_RUNNING to either one of SERVICE_STOPPED, SERVICE_STOP_PENDING, SERVICE_PAUSED or SERVICE_PAUSE_PENDING.

Additionally, ServiceMonitor will promote environment variables from process environment it's own process environment block to the DefaultAppPool. We achieve this by naively copying all variables in our process environment block except for those Environment variable / value pairs present in this list below.

Environment variable exclusion list

Environment Variable Value
TMP "C:\Users\ContainerAdministrator\AppData\Local\Temp"
TEMP "C:\Users\ContainerAdministrator\AppData\Local\Temp"
USERNAME "ContainerAdministrator"
USERPROFILE "C:\Users\ContainerAdministrator"
APPDATA "C:\Users\ContainerAdministrator\AppData\Roaming"
LOCALAPPDATA "C:\Users\ContainerAdministrator\AppData\Local"
PROGRAMDATA "C:\ProgramData"
PSMODULEPATH "%ProgramFiles%\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules"
PUBLIC "C:\Users\Public"
USERDOMAIN "User Manager"
ALLUSERSPROFILE "C:\ProgramData"
PATHEXT ".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC"
PATH *
COMPUTERNAME *
COMSPEC *
OS *
PROCESSOR_IDENTIFIER *
PROCESSOR_LEVEL *
PROCESSOR_REVISION *
PROGRAMFILES *
PROGRAMFILES(X86) *
PROGRAMW6432 *
SYSTEMDRIVE *
WINDIR *
NUMBER_OF_PROCESSORS *
PROCESSOR_ARCHITECTURE *
SYSTEMROOT *
COMMONPROGRAMFILES *
COMMONPROGRAMFILES(X86) *
COMMONPROGRAMW6432 *
DRIVERDATA *

Build

.\build.cmd

Usage

.\ServiceMonitor.exe w3svc

ServiceMonitor is currently distributed as part of the IIS, ASP.NET, and WCF images on Docker Hub. We recommend layering your project on top of those official images as running ServiceMonitor directly in your Dockerfile.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.