Recently, I began migrating all of my remaining servers in my home lab off of Ubuntu Server and onto DNF based systems to provide a unified way of distributing maintenance across my machines. One such server that was a holdout was my DNS server running Pi-Hole. What happened was that Pi-Hole would not update changes made to A and CNAME records via the web interface. I couldn’t seem to figure out if this was Pi-Hole related or the Fedora LXC container I was running. I just got used to restarting the container when I needed to make a change.
Then one day, I ran pihole restartdns
, and there it was, /usr/local/bin/pihole: line 170: service: command not found
. A quick search later and I find that the Fedora LXC container is in fact missing the initscripts
package (which contains command
). This isn’t the first time I have run into this kind of issue. LXC containers often don’t have all the tooling necessary at launch. With this in mind, I think it is finally time to start building my own LXC containers from scratch with the tooling I might want on new systems. I think I will use something like this. Building my own base-images is something I have done in the past with Docker, but it might be time to do it with LXC.
tl;dr: Use initscripts
when you are on an LXC container.