dnsmasq-controller
dnsmasq-controller copied to clipboard
Use distroless docker base image for dnsmasq-controller
Google provides lightweight distroless images to build containers from, see more info here: https://github.com/GoogleContainerTools/distroless This is more lightweight than alpine and comes with a number of other benefits.
This PR updates the Dockerfile used to build the dnsmasq-controller Dockerfile to use one of these distroless images.
Had to employ some fiddly back-and-forth with the passwd and group files in /etc as dnsmasq requires a user&group to run but these aren't present on the distroless image & also can't be created normally because the distroless image has no shell. (also has no package manager so dnsmasq can't be installed directly onto the distroless image - it get's installed onto an ephemeral alpine container and then copied, along with some dependency libraries, to the distroless image)
https://github.com/aenix-io/dnsmasq-controller/issues/6