Hi!
I’d like to know if it’s possible to install a .deb file (and if so, how) directly within the host (not in a container, my .deb requires systemd access) or if there’s a way to build a docker image that has access to systemd during buildtime (or mock values).
Unfortunately my application is closed source and is only available a service installer, which complicates my life somewhat.
Hello,
there is no way to load .deb files into the balena hostOS. There is the way to have access to systemd during build time, just by installing systemd to the container image.
I’m sharing you our open-balena-base open-balena-base/Dockerfile at master · balena-io-modules/open-balena-base · GitHub dockerfile as it’s a feautre rich systemd base image which is used to build open-balena-api open-balena-api/Dockerfile at master · balena-io/open-balena-api · GitHub on top of it. Open-balena-api is a systemd service and gets enabled during the buildtime.
This here is a minimal running docker-compose file content to let open-balena-api run on balenaOS with mounting access to the underlying /run
and /sys/fs/cgroup
version: "2.1"
services:
test-service-works:
image: balena/open-balena-api:latest
tmpfs:
- /run
- /sys/fs/cgroup
cap_add:
- SYS_ADMIN
- SYS_RESOURCE
Here is also an example project showcasing the installation of systemd into a service image, that can run on baleanOS. GitHub - balena-io-examples/balenalib-systemd-example: Example project using systemd with balenalib images
Please let us know if this helps you solve your service installation inside a balena container image.
Best Regards
Harald