2

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
4
  • 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?
    – 030
    Commented Dec 25, 2019 at 12:00
  • @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: coretechnologies.com/products/AlwaysUp/Apps/… Commented Dec 26, 2019 at 12:53
  • Could you post an answer?
    – 030
    Commented Dec 26, 2019 at 12:56
  • 1
    @030: I haven't found a non-commercial solution yet. Commented Dec 26, 2019 at 13:33

1 Answer 1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.