DockerAutoStartHelper
Makes Docker Desktop’s engine come back on its own after an unattended reboot.
|
Note
|
Docker Desktop is a per-USER desktop application, not a Windows service. Its engine only exists inside an interactive session - measured on devBuilder05, every There is no supported headless mode, so the only way to have an engine on a node nobody is sitting at is to make sure a session exists. Four things are configured, and every one of them was needed:
Known limit: a plain WinRM connection is a NETWORK logon, and Windows will not open the credential store for one ("credentials cannot be saved from this logon session"). So |
public static class DockerAutoStartHelper
1. Methods
1.1. EnableDockerAutoStart(ISystemHost, string, string, string)
Configures autologon plus the Docker Desktop startup chain on host. Idempotent - safe to re-run on a node that already has it.
public static void EnableDockerAutoStart(ISystemHost host, string autoLogonUser, string autoLogonPassword, string templateProfile = null)
| Name | Type | Description |
|---|---|---|
host |
ISystemHost |
Host to configure. |
autoLogonUser |
string |
Local account to log on automatically. Must exist on the node. |
autoLogonPassword |
string |
That account’s password, taken from the config’s User entity. |
templateProfile |
string |
Optional profile whose Docker settings are copied to autoLogonUser so the first-run wizard is already done. Null skips the seeding and lets Docker Desktop create its own. |