Search code examples
dockerfig

Docker building fails randomly with Error mounting


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)


Solution

  • Switching to aufs storage seemed to resolve it.

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