Copy the files from this gist into a directory of your choice.
You may customize the StartDocker.ps1
script to include docker commands.
We are now configuring docker to start when Windows starts using the Windows Task Scheduler.
Open an administrator command prompt in the current folder and type:
cd <main folder>
powershell -file .\RegisterTask.ps1
From now on, docker should start when Windows starts.
Inspired from:
- How to start Docker daemon (windows service) at startup without the need to log-in? licensed under CC BY-SA
- popular question on stackoverflow
- Windows Server 2019 + Docker Desktop – AutoStart at startup (boot) computer
- includes timing and docker compose commands
- Start Docker Desktop on Windows Start-up without user logon
- the original script contains too many hard-coded paths and things
I added this:
- instructions to run the RegisterScript (as admin)
- the register script uses the current user (admin)
Published under CC BY-SA.