Running Boot2Docker 1.5.0 under Windows. A container gastrobase
exists and can be started manually with docker start gastrobase
.
When I put this command into /var/lib/boot2docker/bootlocal.sh
, upon startup I get
Post http:///var/run/docker.sock/v1.17/containers/gastrobase/start: dial unix /var/run/docker.sock: no such file or directory. Are you trying to connect to a TLS-enabled daemon without TLS?
time="2015-03-28T19:50:51Z" level="fatal" msg="Error: failed to start one or more containers"
in var/log/bootlocal.log
.
Running ./bootlocal.sh
manually starts Ok.
I have already tried the sudo
-variant, which according to another thread in SO is the wrong choice with Boot2Docker.
This proved to be a racing condition: With the following in bootlocal.sh
startup works
sleep 1
docker start gastrobase
RomanSaveljev suggested
docker run --restart=always --name gastrobase
instead.