I am trying to start docker containers using a script, however, I have observed that the containers do not start at random, and I get the 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 the containers using Weave.
Can anyone tell me how to prevent this from happening, or a shell script which checks if the error is thrown and automatically run it again?
This is known bug occuring with devicemapper
driver only.
Here is the reference of the bug: https://github.com/docker/docker/issues/4036
Best solution is to switch either to aufs
or overlayfs
drivers.
Note that this question seems to be a duplicate from this one: Docker building fails randomly with Error mounting
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.