How to get a Windows Docker Container to auto start on login with Docker Desktop?

35 Views Asked by At

Docker Desktop (on Windows) has an option to auto-start at login, which causes the Docker Desktop app to start on login.

Is there a way to set a container to auto-start on login as well?

For example, I am running the conduktor-console container, which provides a web interface for managing Kafka brokers.

Currently, I have to manually start this container each time I login. Is there a way to set it to automatically start?

1

There are 1 best solutions below

2
Shachar297 On

This isn't a native docker question, but i would suggest to use the Windows Task Scheduler, Combined with a simple powershell script that will run the container.

  1. Create a PowerShell script that will docker run the container
  2. Create a task Task Scheduler that will run this script on computer startup.

See How to Automate PowerShell Scripts with Task Scheduler.