Mail archive

[alpine-user] shared apk cache

From: Alex Athanasopoulos <>
Date: Thu, 17 Jan 2019 14:10:20 +0200

Is it safe to use an /etc/apk/cache directory that is shared across
multiple Alpine Linux systems with the same version?

I use Alpine containers on LXD.

I just started using them with a shared /etc/cache/apk as follows, and
it seems to work fine:

One-time setup (using snap lxd 3.9 on Ubuntu):

    lxc storage volume create default alpine38-apk

    lxc profile copy default alpine38

    lxc storage volume attach-profile default alpine38-apk alpine38

Then create alpine/3.8 containers like this:

    lxc launch images:alpine/3.8 a1 -p alpine38

    lxc launch images:alpine/3.8 a2 -p alpine38

The resulting containers a1, a2 have read/write permission on the same
volume, which is mounted on /etc/apk/cache.

When alpine/3.9 is released, I'll make a new shared volume alpine39-apk,
so as not to mix different versions with the same cache.


- Alex

Received on Thu Jan 17 2019 - 14:10:20 UTC