Yeah that’s what I had essentially done.
I had a docker image named hassio, which installed avahi and everything else like socat and jq.
It would then start the install script, which would kick off the systemd calls. But that would fail as systemd can’t run inside a docker image.
systemd ins’t available for alpine, so I changed the base image from Ubuntu to the official Docker base image, which is based off alpine. However you need to use the alpine equivalent of systemd, which I couldn’t get to work properly inside the container.