Note: Alpine Linux 3.18 or newer verison has full eBPF support out-of-box, older version of Alpine Linux need to build kernel by yourself.
Edit apk's repositories config:
vi /etc/apk/repositories Then enable community repo, for example:
https://dl-cdn.alpinelinux.org/alpine/edge/main
https://dl-cdn.alpinelinux.org/alpine/edge/communityEdit OpenRC's config file:
vi /etc/rc.confThen edit rc_cgroup_mode, defaultly it would be #rc_cgroup_mode="hybrid", we should switch to unified to make sure CGroup2 in default.
rc_cgroup_mode="unified"Then enable cgroups service:
rc-update add cgroups bootEdit /etc/init.d/sysfs:
vi /etc/init.d/sysfsAdd the following to the mount_misc section:
# Setup Kernel Support for bpf file system
if [ -d /sys/fs/bpf ] && ! mountinfo -q /sys/fs/bpf; then
if grep -qs bpf /proc/filesystems; then
ebegin "Mounting eBPF filesystem"
mount -n -t bpf -o ${sysfs_opts} bpffs /sys/fs/bpf
eend $?
fi
fiBe careful that the format of the script /etc/init.d/sysfs must be fine, or sysfs service will be failed.
Installer: https://github.com/daeuniverse/dae-installer/
This installer offered an OpenRC service script of dae, after installation, you should add a config file to /usr/local/etc/dae/config.dae, then set its permission to 600 or 640:
chmod 640 /usr/local/etc/dae/config.daeIf your config file is OK, then you can start dae service:
rc-service dae startUse rc-update to enable dae service:
rc-update add dae