How to start Docker daemon (windows service) at startup without the need to log-in?

前端 未结 4 1653
遇见更好的自我
遇见更好的自我 2020-12-25 13:50

We have Docker for Windows installed on a Windows Server 2016 Datacenter box.

We use this box as a build agent for our docker containers.

When we try to conn

4条回答
  •  旧时难觅i
    2020-12-25 14:54

    The best solution for windows server is to use Task Scheduler to create task that run "Docker Desktop" app in case of system startup.

    to do that search "Task Scheduler", click on "create task...".

    on the new tab specify a name for the task and choose "Run whether user is logged on or not" radio button and "Run with highest privilege" checkbox. at the end of page select appropriate windows type.

    now click trigger tab and add new trigger. on the new trigger page select "At startup" and click OK.

    finally, click on the actions tab and add a new Action that run "Docker windows" shortcut that run docker daemon on windows.

    As docker starting, pass 1 minute and container starting may take a few time (in my case 4 minute) wait a few minutes and then test whether your docker is running.

提交回复
热议问题