liveBook · Manning

Windows service

As explained in Learn Docker in a Month of Lunches, Second Edition

A Windows Service is a background process managed by the Windows service-control infrastructure.

A Windows service is a background process managed by Windows. Core services handle operating-system work such as instrumentation and DNS lookups, commonly through svchost.exe. section 13.2

Windows Server Containers expose a containerization challenge: IIS runs as a Windows service, while Docker expects one monitored entry-point process. The application worker process, w3wp.exe, is not enough for Docker to track service health. section 13.2

Bridge the service model to Docker with:

  • Service Monitor, which starts and watches a chosen Windows service, then ends the container if that service fails. section 13.2
  • Log Monitor, which reads logs from sources such as log files and the Windows Event Log. section 13.2
# build using the default 2025 OS version:
docker build -t diamol/ch13-aspnet:2e .\aspnet
# if you get a manifest error, set the version to be 2019 or 2022:
# docker build --build-arg WINDOWS_VERSION='ltsc2022' `
# -t diamol/ch13-aspnet:2e .\aspnet
# run the container in the background:
docker run --name aspnet -d -p 8084:80 diamol/ch13-aspnet:2e
# look at the container processes:
docker top aspnet

Run an ASP.NET Windows container and inspect its processes with docker top to see service-hosted application behavior. section 13.2

How Learn Docker in a Month of Lunches, Second Edition covers it

How deep it goes
Explains service processes and Docker integration, but stops short of general Windows service administration.
Examples
Demonstrates IIS in a Windows container, svchost.exe processes, w3wp.exe workers, and docker top inspection.
What it assumes
Assumes the ability to build and run Windows containers; demonstrates process inspection rather than teaching service administration.
What you can do after
Operate/configure Windows containers by selecting Service Monitor as an entry point and verifying service-backed processes.
How it connects
Connects Windows services with IIS, Docker, Windows Server Containers, svchost.exe, w3wp.exe, and Linux daemons.

Also explained in

Compare how 2 books explain Windows service →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Learn Docker in a Month of Lunches, Second Edition. The section links point to the parts of the book it draws on.