Windows Server node fails to restart containers with errors such as this:
Error response from daemon: hcsshim::ActivateLayer failed in Win32: The process cannot access the file because it is being used by another process. (0x20)
The default shutdown timeout (10 seconds) for Docker daemon is too short, and resources cannot be unmounted in time.
Delay the restart time using
"shutdown-timeout": 30 in
$Env:ProgramData/daemon.json, which allow extra time for graceful shutdown:
Configuration of Docker Daemon on Windows Server is explained extensively in this MSDN article: