Docker building fails randomly with Error mounting

2019-07-20 10:35发布

Every time I try building with docker or fig an image (doesn't matter which one), I randomly will get

Cannot start container <containerId>: Error getting container <containerId> from driver devicemapper: Error mounting '/dev/mapper/docker-8:1-262151-<containerId>' on '/var/lib/docker/devicemapper/mnt/<containerId>': no such file or directory

Weird thing is, if I re-run it, it usually won't have the same error.

Note that I am running docker inside vagrant (ubuntu-trusty-64)

标签: docker fig
3条回答
▲ chillily
2楼-- · 2019-07-20 10:53

This is known bug occuring with devicemapper driver only.

Here is the reference of the bug: https://github.com/docker/docker/issues/4036

Solution is to switch either to aufs or overlayfs drivers.

查看更多
别忘想泡老子
3楼-- · 2019-07-20 10:56

I have seen this many times in docker-1.4.1, especially if you're using a base image built with a previous version of docker. You can try to rebuild your base image with docker-1.4.1, but why I ended up doing with just going back to docker-1.3.3 for now.

查看更多
Root(大扎)
4楼-- · 2019-07-20 11:09

Switching to aufs storage seemed to resolve it.

I used a base image box from phusion which seems to optimize for docker.

查看更多
登录 后发表回答