microsoft / IIS.ServiceMonitor

An entrypoint process for running IIS in Windows containers
MIT License
126 stars 42 forks source link

Purpose #15

Closed Air-Git closed 6 years ago

Air-Git commented 6 years ago

Can you provide a description of the purpose of ServiceMonitor. I know it monitors the w3svc service, but for what purpose? Thanks

mcy94w commented 6 years ago

Docker starts with a foreground process. if the foreground process exits, the container exists. In IIS, the w3svc service is the foreground "process" that should be used to start the container. However, Docker does not take a service as an entrypoint. ServiceMonitor serves the purpose of entrypoint for IIS, monitors the w3svc service and exit when the state of w3svc is not RUNNING.

xied75 commented 6 years ago

For people who landed here in the future, here is a good explanation on the "purpose", https://github.com/krallin/tini/issues/8 (p.s. Tini is the thing in the other world) :)