Some more progress, two workarounds that after very limited testing seem work for us, though running Docker Desktop on Windows Server still doesnāt feel right. And Iām still curious to know what changed last month, and what may be planned.
The best option if using Docker Desktop on Windows Server, I feel, is to simply create a Scheduled Task to run Docker Desktop (a minute) after server start. Make sure to choose āRun whether user is logged on or notā, specify the user that should run it, and apparently important: set the āstart inā folder to match that userās home directory. (This is not set for the Start Menu shortcut, so maybe thereās a different default when really logging in, or maybe Iām just wrong about this requirement.) Finally, ensure to disable the standard option āStop the task if it runs longer than 3 daysā. When saving, you will be prompted for the userās password (and that is actually validated as well). Running docker system info
should show you the settings that you may have set using Docker Desktop Dashboard.
After a restart it may take a while before all is running, during which things like docker ps
(regardless which user runs that) may show no result, or an error:
> docker ps
> docker ps
Error response from daemon: Bad response from Docker engine
> docker ps
error during connect: This error may indicate that the docker daemon is not running.: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/containers/json: open //./pipe/docker_engine: The system cannot find the file specified.
But those errors will go away.
When started using Task Scheduler one cannot use the Docker Desktop Dashboard, not even when the very same user logs in. When trying to start it, it will complain:
Docker failed to initialize
Docker Desktop is already running.
Close it in other sessions to continue.
I assume Windows professionals also know how to run this as a service, rather than some Scheduled Task that is hard to find.
Alternatively, simply enabling the Dashboardās checkbox to run Docker Desktop after login, and then using Microsoftās instructions to make a user login automatically after restart, works too. But then, of course, Docker Desktop will stop if that same user really logs in and then logs out rather than only disconnects. Minor advantage: the Docker Desktop Dashboard is available this way.