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.