Shared ccache directory between docker containers

Ragnar Rova <[email protected]> Fri, 5 Feb 2016 12:05:12 +0100
Newsgroups gmane.comp.compilers.ccache
Message-ID <CAOkV6uMh4oY-Zyp0Zrfh+vCC23C9w1zaO5KG71fyM1tDirasDg@mail.gmail.com>
Hello list.

Is it safe to share the ccache directory between docker containers wrt to
locking?

We use host mounts (i.e. not volumes) like this:

docker run -v
/var/tmp/docker-build-ccache:/var/tmp/docker-build-ccache my-compile-job

We sometimes see issues when simultaneous jobs are run.

docker storage Driver: aufs
Backing Filesystem: extfs
ccache version 3.1.10

ccache: FATAL: Failed to open
/var/tmp/docker-build-ccache/tmp/tmp.cpp_stderr.docker-host.21810: No such
file or directory

The hostname of these concurrent containers is the same. PID:s in docker
are translated (they are in their own PID namespace).