Mail archive
alpine-user

[alpine-user] shared apk cache

From: Alex Athanasopoulos <alex_at_melato.org>
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
/etc/apk/cache

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.


Reference:

https://wiki.alpinelinux.org/wiki/Local_APK_cache


- Alex




---
Unsubscribe:  alpine-user+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-user+help_at_lists.alpinelinux.org
---
Received on Thu Jan 17 2019 - 14:10:20 UTC