Answers: <p>Docker can be set to run as a service, that should bypass the need to log in with a service account:</p>
  <ol>
  <li><code>dockerd.exe --register-service</code></li>
  <li><code>net start Docker</code></li>
  <li><code>sc config Docker start=auto</code></li>
  </ol>
  <p><a href="https://github.com/moby/moby/issues/27696" rel="nofollow noreferrer">Dockerd.exe</a></p>
  
Answers: CC BY-SA 4.0
Answers: 2021-08-10T01:38:06.437Z
Answers: 2021-08-10T01:38:06.437Z
Answers: Josh Zhang
Body: <p>Is it possible to run Docker containers without being logged in as a user on Windows?  I have a few containers I am auto-deploying on a server, but I am currently stuck leaving a generic service account logged in so that the containers run and the docker daemon stays running.</p>
  
  <p>My current setup works, but I feel like there must be a better way to deploy/run than to always have an account logged in.</p>
  
  <p><strong>Setup</strong></p>
  
  <ul>
  <li>Windows Server 2012 and 2016</li>
  <li>No docker-desktop because of nested virtualization scenario requirement</li>
  <li>Linux not an option due to business requirements</li>
  </ul>
  
Comments: CC BY-SA 4.0
Comments: 2019-12-25T12:00:17.023Z
Comments: Did you create a Windows Scheduled task? In that service it is possible to click one 'user should not be logged on'. Does that work and would it be an option?
Comments: 030
Comments: CC BY-SA 4.0
Comments: 2019-12-26T12:53:41.520Z
Comments: @030 The Windows Scheduled task still needed a user to login.  The only way I've managed to get this to work is using Docker Windows, not the toolbox.  The only thing I've found is a third party tool: https://www.coretechnologies.com/products/AlwaysUp/Apps/StartDockerDaemonAsAWindowsService.html
Comments: Wesley Rolnick
Comments: CC BY-SA 4.0
Comments: 2019-12-26T12:56:10.980Z
Comments: Could you post an answer?
Comments: 030
Comments: CC BY-SA 4.0
Comments: 2019-12-26T13:33:15.483Z
Comments: @030: I haven't found a non-commercial solution yet.
Comments: Wesley Rolnick
Tags: <docker><windows>
Title: Run Docker Containers without having a logged in User on Windows
UserDisplayName: Wesley Rolnick
ThreadText: # Run Docker Containers without having a logged in User on Windows
  
  (Asked by: username_0 on 2019-07-17)
  
  Is it possible to run Docker containers without being logged in as a user on Windows? I have a few containers I am auto-deploying on a server, but I am currently stuck leaving a generic service account logged in so that the containers run and the docker daemon stays running.
  
  My current setup works, but I feel like there must be a better way to deploy/run than to always have an account logged in.
  
  **Setup**
  
  * Windows Server 2012 and 2016
  * No docker-desktop because of nested virtualization scenario requirement
  * Linux not an option due to business requirements
  
  **Tags:** docker, windows
  
  > **Comments:**
  > **username_1**: Did you create a Windows Scheduled task? In that service it is possible to click one 'user should not be logged on'. Does that work and would it be an option?  
  > **username_0**: @username_1 The Windows Scheduled task still needed a user to login.  The only way I've managed to get this to work is using Docker Windows, not the toolbox.  The only thing I've found is a third party tool: https://www.coretechnologies.com/products/AlwaysUp/Apps/StartDockerDaemonAsAWindowsService.html  
  > **username_1**: Could you post an answer?  
  > **username_0**: @username_1: I haven't found a non-commercial solution yet.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2021-08-10. Score: 1
  
  Docker can be set to run as a service, that should bypass the need to log in with a service account:
  
  1. `dockerd.exe --register-service`
  2. `net start Docker`
  3. `sc config Docker start=auto`
  
  [Dockerd.exe](https://github.com/moby/moby/issues/27696)
  
  
  ---
  
  