nh-mike / gravity-sync-docker

Launch Gravity Sync in a Docker container, and keep your PiHoles in a state of reduced entropy!
https://hub.docker.com/r/nhmike94/gravity-sync-docker
GNU Lesser General Public License v3.0
24 stars 2 forks source link

Possible to make available for ARM architectures? #3

Closed MichaelXavier closed 3 years ago

MichaelXavier commented 3 years ago

I figure lots of people like me are running pihole on raspberry pis with ARM chips. The pihole docker image auto detects your architecture and is available for ARM. I was wondering if it would be possible to do the same for this project..

nh-mike commented 3 years ago

Hi @MichaelXavier I'd be happy to do this, I'll just need to look into how to go about it.

I've got plenty of Raspberry Pis around, I guess I probably just have to compile on one of them.

This may take some time depending on some of the other containers I use for testing.

Watch this space, I'll come back to you once I've figured it all out.

In the mean time, you should be able to git pull this repository on your pi and run the build script, and then just set your image to pull in docker_gravitysync:latest

MichaelXavier commented 3 years ago

I took what you had on master and was able to get it building via some minor changes:

  1. I had to add a .dockerignore file before the project would build. I'm not sure if that should be included in the repo or not.
  2. Took out COPY qemu-arm-static /usr/bin because it wasn't in the directory anyways and wasn't sure what it did. So far everything is working so I'm wondering if that wasn't necessary?
  3. Switched the tini download to use the ARM version: ADD https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini-static-arm64 /tini
nh-mike commented 3 years ago

Fantastic.

I'm still working on this. At the moment, I am building my released images on Docker Hub, which doesn't support building arm natively - that is why I am looking into using Qemu. I understand that Balena (the makers of etcher) are cross building on Docker Hub by using Qemu.

Did you build this locally on your rpi? If so, which distro are you running?

MichaelXavier commented 3 years ago

Ah ok that makes sense. Yeah I built this on my rpi running NixOS. The image currently lives here.

nh-mike commented 3 years ago

Hi @MichaelXavier

I've been working rather hard on this one today and I'm happy to announce that I have been able to compile for ARM. I have not yet been able to test this on a Raspberry pi yet - it's 2 in the morning and I don't quite have it in me, however I am quite confident that it should work.

Would you like to give it a shot and let me know how you go with it? If you pull either the tag latest or 3.4.4.1, they have availability for ARM processors.

Thanks

MichaelXavier commented 3 years ago

@nh-mike just tried it and it works great. Thank you!

nh-mike commented 3 years ago

Great, thanks for getting back to me on that!