~alpine/users

3 3

[alpine-user] shared apk cache

Alex Athanasopoulos <alex@melato.org>
Details
Message ID
<964c6681-2961-f466-6819-ee2745188a63@melato.org>
Sender timestamp
1547727020
DKIM signature
missing
Download raw message
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@lists.alpinelinux.org
Help:         alpine-user+help@lists.alpinelinux.org
---
PICCORO McKAY Lenz <mckaygerhard@gmail.com>
Details
Message ID
<CALci+FSfOYcbAst25L78_mTc_=ONuGchvhVJe08ULuXZErJdbw@mail.gmail.com>
In-Reply-To
<964c6681-2961-f466-6819-ee2745188a63@melato.org> (view parent)
Sender timestamp
1547728649
DKIM signature
missing
Download raw message
El jue., 17 de ene. de 2019 a la(s) 08:10, Alex Athanasopoulos (
alex@melato.org) escribió:

> Is it safe to use an /etc/apk/cache directory that is shared across
> multiple Alpine Linux systems with the same version?
>
as i know, the index and packages to take will be "controled" by the index
of the repository so.. if in the cache directory we have two versions only
those registered by the index repository loaded will be taken and make
effect!


> I use Alpine containers on LXD.
>
was a great idea, can you make a wiki page about it? seems wiki NEED A LOVE!


> I just started using them with a shared /etc/cache/apk as follows, and
> it seems to work fine:
>
on same versions or differents versions of alpine? more than one.?
i guess if two alpine version close will not have too much conflicts.. but
as i said in firts.. there's no techincally problems


>
>
Léo El Amri <leo@superlel.me>
Details
Message ID
<5378204e-e881-9ddd-e125-facea5ec4df9@superlel.me>
In-Reply-To
<964c6681-2961-f466-6819-ee2745188a63@melato.org> (view parent)
Sender timestamp
1547727557
DKIM signature
missing
Download raw message
I recently looked-up the code related to caching. I'd say it's safe to
"sequentially" use a common cache for the same Alpine version.

Your method for sharing it is right.

On 17/01/2019 13:10, Alex Athanasopoulos wrote:
> Is it safe to use an /etc/apk/cache directory that is shared across
> multiple Alpine Linux systems with the same version?
>
> - Alex


---
Unsubscribe:  alpine-user+unsubscribe@lists.alpinelinux.org
Help:         alpine-user+help@lists.alpinelinux.org
---
Alex Athanasopoulos <alex@melato.org>
Details
Message ID
<346198c5-54ce-da52-d4d5-f08962a04f91@melato.org>
In-Reply-To
<CALci+FSfOYcbAst25L78_mTc_=ONuGchvhVJe08ULuXZErJdbw@mail.gmail.com> (view parent)
Sender timestamp
1547729065
DKIM signature
missing
Download raw message
I have made a wiki page about how to use Alpine containers on LXD:

https://wiki.alpinelinux.org/wiki/Install_Alpine_on_LXD

On 1/17/19 2:37 PM, PICCORO McKAY Lenz wrote:
>  
>
>     I use Alpine containers on LXD.
>
> was a great idea, can you make a wiki page about it? seems wiki NEED A
> LOVE!
Reply to thread Export thread (mbox)