[ccache] Shared ccache directory between docker containers

Ragnar Rova ragnar.rova at gmail.com
Mon Feb 8 22:04:08 UTC 2016


Thanks, i'll try it out. How stable is the memcached support?

On Mon, Feb 8, 2016 at 10:24 PM, Anders Björklund <anders at itension.se>
wrote:

> Ragnar Rova wrote:
> > Thanks, i'll try upgrading although I made sure hostname is unique now.
>
> >> Is it safe to share the ccache directory between docker containers wrt
> >> to locking?
>
> It would also be interesting to test sharing a cache between containers
> on different hosts, by using the "memcached" feature over the network:
>
> https://lists.samba.org/archive/ccache/2016q1/001394.html
>
> One method of doing so is mounting a moxi socket inside the container,
> to avoid it having to "know" about the rest of the memcached network...
>
> docker run -v /tmp/moxi.sock:/tmp/moxi.sock [...]
>
>
> Then you can access the memcached servers over this unix socket,
> while sharing the latest cache data in host memory when doing so.
>
> export MEMCACHED_SERVERS=/tmp/moxi.sock
> export CCACHE_MEMCACHED_CONF=--SOCKET=\"/tmp/moxi.sock\"
>
> You would need to start the host memcached proxy up first, though.
> And also to configure it with the cluster configuration (or URL):
>
> export MEMCACHED_SERVERS=localhost
> moxi -s /tmp/moxi.sock -d -z 11311=localhost:11211
>
> /Anders
>


More information about the ccache mailing list