Windows 2008 boots up Docker Toolbox and runs the container
Create a new docker-startup.bat
@ echo offREM Set the name of the VM configuration where dockerd will be hostedset BOOT2DOCKER_VM=defaultset PATH=%PATH%; "D:\ Program Files\ Docker Toolbox\" REM Start the default machine (or any other machine) docker-machine start% BOOT2DOCKER_VM%REM docker-compose up or docker run docker-compose up-d
Because I use Docker Compose to manage multiple containers, you can also run the image directly with docker run
Create and set up a task schedule
Cdn.xitu.io/2018/9/29/16624d8a9be88764?w=631&h=506&f=png&s=11912 ">
Set to execute the plan when the system starts
Specify the script to execute
Program or script Select the docker-startup.bat you just created
Start with D:\ Program Files\ Docker Toolbox\
"start" points to the directory where docker-startup.bat is located and cannot be included in double quotes
After booting the script automatically, the service will run in the background. Opening VirtualBox will show that the image is off. Don't panic, it has been started in the background. )
An error will be reported when opening Docker Quickstart Terminal because it has been occupied by the background
Wait a moment after power on, let the service run, ssh to docker
Enjoy life
Reference:
Https://serverfault.com/questions/753971/windows-how-to-start-docker-vm-att-system-boot
Source: windows 2008 boot up Docker Toolbox and run container