Error starting docker containers
I am trying to start docker containers using a script, however I noticed that containers are not started at random and I get a similar error message every time -
level="fatal" msg="Error response from daemon: Cannot start container 5cdfbcf5bcf140410e8bec0055614f2d93afaa04fd455e9a7960fed546cf0fa3: Error getting container 5cdfbcf5bcf140410e8bec0055614f2d93afaa04fd455e9a7960fed546cf0fa3 from driver devicemapper: Error mounting '/dev/mapper/docker-202:1-275538-5cdfbcf5bcf140410e8bec0055614f2d93afaa04fd455e9a7960fed546cf0fa3' on '/var/lib/docker/devicemapper/mnt/5cdfbcf5bcf140410e8bec0055614f2d93afaa04fd455e9a7960fed546cf0fa3': no such file or directory"
However, if I run the same command again after it fails, it works.
I am launching containers using Weave.
Can anyone tell me how to prevent this from happening, or a shell script that checks if an error was thrown and automatically runs it again?
source to share
This bug is only known with the driver devicemapper
.
Here is the link to the bug: https://github.com/docker/docker/issues/4036
The best solution is to switch to drivers aufs
or overlayfs
.
Note that this question seems to be a duplicate of this one: Docker building accidentally fails with setting Error
source to share