dnsmasq-controller icon indicating copy to clipboard operation
dnsmasq-controller copied to clipboard

Use distroless docker base image for dnsmasq-controller

Open be185057 opened this issue 1 year ago • 2 comments

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.

be185057 avatar Apr 25 '24 14:04 be185057

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)

be185057 avatar Apr 25 '24 14:04 be185057

https://github.com/aenix-io/dnsmasq-controller/issues/6

bencoxford avatar Apr 25 '24 16:04 bencoxford