-
Notifications
You must be signed in to change notification settings - Fork 269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open Docker Desktop at startup without logging on Windows #515
Comments
What you describe should be possible through the Docker Engine - the instructions for install of this are available here. This would not be possible with Docker Desktop. |
Hi @macmirchdocker. I tried installing docker directly in WSL, but once again you can't start it at windows startup without logging in with a user. At the moment, there is no way of doing that except with some whacky workaround like auto login. I don't consider this issue closed. |
Re-opening. |
Has this issue been revisited at all? |
What a pain. I am trying to set up a Windows Server to be a Jenkins Agent but there is no way to enable it to run docker commands because of this. A selection of errors I get when trying various workarounds are:
the various docker .exe seem to start, but they are never in a functional state (for running containers in the WSL 2 backend) except when Docker Desktop is started interactively. The Server I need to get this to work on doesn't allow me to configure auto login and I cannot allow "Log on as a batch job" for the admin user due to a group policy. Running a scheduled job at boot as the SYSTEM authority also doesn't bring up docker in a functional state. |
Does ARSO help in your situation? |
I ended up creating another local admin user (besides the default Administrator on Windows Server) and could configure automatic login for that via netplwiz and by following https://www.makeuseof.com/windows-11-missing-auto-login-fix/ to restore the auto login option there. Now I just have a shellscript in shell:startup that definitely runs in user mode and Docker Desktop is started properly and then I can finally run some docker commands in my Jenkins Agent jobs... |
ARSO solved my issue as well. |
Tell us about your request
It should be possible to start Docker Desktop on windows at startup without having to log in first.
Which service(s) is this request for?
Docker for Windows
Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?
After a long and frustrating search, I came to the conclusion that it is currently impossible to start Docker Desktop or the docker engine at startup on windows without logging with a user.
Solutions I found on internet were either to configure a task to launch Docker Desktop at startup or to use the daemon as a service that automatically start. None of these seem to work anymore, because now Docker Desktop must be run in interactive mode and it seems that starting dockerd alone don't work with windows, or at least is not supposed to be used that way.
I understand there is a security issue of being able to run docker without logging first, but it makes it impossible to run applications in production reliably using docker, as a server reboot will make them inaccessible until someone actively logs into the server and start Docker Desktop.
This can lead to frequent application outages, that are easily fixed (providing there is someone available and authorized to log into the server and start Docker Desktop), but hinders productivity and customer satisfaction.
There are other cases when this is inconvenient, such as using docker to do CI.
We should be able to automatically start Docker Desktop at server startup in production.
Are you currently working around the issue?
As far as I know from my research, the only workaround is to automatically logs a user at startup, but the security implications are way worse so we didn't do that.
Additional context
Docker Desktop v4.21.1
Windows Server 2022
The text was updated successfully, but these errors were encountered: