Search code examples
alpine-linuxalpine-package-keeperipxe

Alpine netboot APKs at boot time


I new to alpine linux, so I didn't really grasped the concept of it yet.

What I want to accomplish is a netboot alpine with apks that aren't included in the alpine-base pkg. For example sudo python3

I managed to boot alpine with dnsmasq's tftp server and lighttpd.

As far I understand I can provide an overlay.tar.gz in cmdline.txt. If i add the alpine repo to /etc/apk/repositories and then apk add the pkgs then save the overlay and boot with it, it will have the pkgs I need.

But then it will load them from the external alpine repos.

What I want is to have them served with my http server.

What is the best way to do this?

I figured I could maybe add the pkgs in the APKINDEX.tar.gz and the corresponding .apk-s to the http server.

But this doesn't really seem to be a good solution in my opinion.

Or is it?

Or maybe I should make a custom alpine image and then boot that?

Any help would be much appreciated, because I don't think I even managed to formulate the problem, since I didn't really found anything on the internet yet.


Solution

  • Found the easyest solution:

    Serving an extra repository with the http server with the needed packages, adding the repository to /etc/apk/repositories, and including the packages in /etc/apk/world.

    This way when it boots it will install the additional packages from the extra repository.