[RFC] ApkWrt

Daniel Golle daniel at makrotopia.org
Sat Feb 12 14:11:30 PST 2022

On Sat, Feb 12, 2022 at 10:32:09PM +0100, Enrico Mioso wrote:
> Hello!
> thanks for your interesting work!
> Out of curiosity - did you use extroot or some other mean to run the Alpine Linux Container?

APK3 has the ability to manage different storage layers, one of them
being the normal rootfs. We use that just like we used opkg before.

For containers, we may use special packages which will be installed
into another storage layer (using 'uvol').
Then uxc (a minimalist OCI run-time based on OpenWrt's procd-ujail)
can be used to setup the container environment.

The idea is that in future we will have a binary repository which will
contain container packages, such as base-installations of popular
Linux distributions (I've packaged Alpine and Debian for now) or
complete exports of existing containerzied services (such as PiHole
or Jellyfin).
As a result, users should be able to manage containers just like they
would install/update/remove regular packages using the package

apk add jellyfin
should create a storage volume and write the rootfs of the container
there (as well as OCI run-time config.json) and register the
container with uxc.

If selected to launch automatically when the system is started, uxc
will launch the container automatically once the storage volume becomes
available during boot up.

I hope this makes it a bit more clear.

> Thanks!
> Enrico
> On Sat, 12 Feb 2022, Paul Spooren wrote:
> > Date: Sat, 12 Feb 2022 14:16:05
> > From: Paul Spooren <mail at aparcar.org>
> > To: openwrt-devel <openwrt-devel at lists.openwrt.org>
> > Cc: Ariadne Conill <ariadne at dereferenced.org>,
> >     Daniel Golle <daniel at makrotopia.org>, Timo Teras <timo.teras at iki.fi>,
> >     John Crispin <john at phrozen.org>
> > Subject: [RFC] ApkWrt
> > 
> > Hi all,
> > 
> > For the last year or so[1] I’ve been working on replacing the package manager OPKG with APK (Alpine Package Keeper)[2]. Different from our OPKG fork is APK an actively developed project. OPKG is replaced entirely, both on device as well as the build system.
> > 
> > Using some CI I started to build all available snapshot firmware images and published them for others to test[3]. Some targets fail to build but I’m working on it. Please feel free to give it a try and provide feedback!
> > 
> > At this point only the base system is compiled without the community feeds, the installation of remote packages already works (e.g. `apk add tc-full`). Other commands like `apk audit` allow system integrity checks and more.
> > 
> > The SDK already works to create `.apk` packages, the ImageBuilder requires a bit more work. Overall APK still depends on OpenSSL and libfetch, after getting the base up and running I’ll start to look into replacing those with more lightweight alternatives like WolfSSL and uclient-fetch.
> > 
> > Within the next month I hope to create documentation in collaboration with Daniel to explain how APK, uvol and uxc can work together. Essentially it allows to install containers on OpenWrt devices. Just a few days ago we ran Alpine Linux within a container on a Belkin RT3200, simply installed from an `alpine.apk` package, the same works for Debian containers. In future this could allow to run arbitrary container setups on routers.
> > 
> > This work required a bunch of help, so thanks to John, Timo, Ariadne and Daniel!
> > 
> > Best,
> > Paul
> > 
> > [1]: https://github.com/openwrt/openwrt/pull/4294
> > [2]: https://gitlab.alpinelinux.org/alpine/apk-tools
> > [3]: https://downloads.asu.aparcar.org/apkwrt/targets/
> > 
> > 
> > _______________________________________________
> > openwrt-devel mailing list
> > openwrt-devel at lists.openwrt.org
> > https://lists.openwrt.org/mailman/listinfo/openwrt-devel

> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

More information about the openwrt-devel mailing list