简体   繁体   中英

how to Automatically start a container when Windows PC start?(Docker Quickstart Terminal, DockerToolbox-19.03.1.exe)

how to Automatically start a container when Windows PC start?(Iam using Docker Quickstart Terminal, DockerToolbox-19.03.1.exe) I found the Jenkins container is not automatically start when the PC start, every time I have to open Docker Quickstart Terminal manually and then type "docker container run --name jenkins-blueocean --rm --detach --network jenkins --env DOCKER_HOST=tcp://docker:2376 --env DOCKER_CERT_PATH=/certs/client --env DOCKER_TLS_VERIFY=1 --volume jenkins-data:/var/jenkins_home --volume jenkins-docker-certs:/certs/client:ro --publish 1122:8080 --publish 50000:50000 jenkinsci/blueocean"

I don't use docker on windows, so sorry if this work-around is not useful !

You can make a .bat script that runs the command at startup ( task scheduler should have the option as you might want to wait for Docker to finish loading ).

Here is a level 0 tutorial that also shows how to setup a task at startup.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM