SickHub/docker-cups-airprint

arm64 support

vchrisb opened this issue · 6 comments

docker-cups-airprint does work fine on arm64 💯

I only disabled IPv6 and limited to eth0 for avahi.
I'm running it on kubernetes with host networking and without limiting to eth0 it would announce way to many interfaces.

sed -i 's/^.*allow-interfaces=.*/allow-interfaces=eth0/' /etc/avahi/avahi-daemon.conf
sed -i 's/^.*use-ipv6=.*/use-ipv6=no/' /etc/avahi/avahi-daemon.conf
#sed -i 's/^.*enable\-reflector=.*/enable\-reflector\=yes/' /etc/avahi/avahi-daemon.conf
#sed -i 's/^.*reflect\-ipv=.*/reflect\-ipv\=yes/' /etc/avahi/avahi-daemon.conf
sed -i 's/^.publish-aaaa-on-ipv4=.*/publish-aaaa-on-ipv4=no/' /etc/avahi/avahi-daemon.conf

My image can be found here https://hub.docker.com/repository/docker/vchrisb/airprint-bridge/general

Awesome!

I would now add a few variables to make this configurable:

AVAHI_INTERFACES=${AVAHI_INTERFACES:=""}
AVAHI_IPV6=${AVAHI_IPV6:="no"}
AVAHI_REFLECTOR=${AVAHI_REFLECTOR:="no"}

I would set "publish-aaaa-on-ipv4" based on the IPV6 variable, if "no", then this is "no" as well.

Do you agree @vchrisb ?

See 327c11f

It would be awesome if you could test it as I don't have the environment to verify that it's working as intended. dev image should be built within the next 30 min. on Docker hub.

thx @DrPsychick
do you have a possibility to add multi arch builds to travis?
docker buildx could be a easy way to achieve that.
I use:

export IMAGE="airprint-bridge"
export VERSION="snapshot"
docker buildx create --name mybuilder
docker buildx use mybuilder
docker buildx inspect --bootstrap
docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 . -t vchrisb/${IMAGE}:${VERSION} --push

and this this an github actions example I use:
https://github.com/vchrisb/e3dc-rest/blob/master/.github/workflows/main.yml

the dev branch works great without modification. I only had to create the image for arm64.

I was also thinking of adding automated multi-arch build, but I have no experience with it yet, so many thanks for your input.

Did a little googling, it's experimental, but apparently supported. Found this article that shows how to do it with travis: https://medium.com/@quentin.mcgaw/cross-architecture-docker-builds-with-travis-ci-arm-s390x-etc-8f754e20aaef.
A build on my local machine took a while, but went just fine.

Thing is, I have to switch the whole setup to build on travis and push images to docker hub, but I think that might be a good idea anyway (docker hub is extreemly slow in building).

Please contact me via my github email if you're willing to discuss and pull this off together - I could sure use some help :)

pushed a dev arm image manually -> closed.

full multi-arch build will be covered here: #21