I would like to run a custom script which sets up the docker network and starts a docker container (after setting up some directories). This script is slow so I would like it to run when my computer is starting up, but only AFTER the docker daemon is startup.
Following the instructions here Run Batch File On Start-up I can easily create a batch file and have it run on starutp, however I am currently getting the error:
docker network create --driver nat MY-net error during connect: Post http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.40/networks/create: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.
I am quite sure it is not related to privileges since running the script itself works.
Questions: Is it possible on windows batch file start to somehow run my batchfile last (after all other startup have been run, services/daemons are already started)?
Alternatively, is there some hook , which would let me run some custom script once the docker Daemon is up and running.
I am running Docker 19.0 on Windows 10. My docker is configured to be run on startup, and the daemon runs smoothly as I use docker regaulraly, so the issue seems to be that the script is beinf run before the docker daemon is fully started.