Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for ARM #4

Closed
elRadix opened this issue Mar 20, 2019 · 7 comments
Closed

Support for ARM #4

elRadix opened this issue Mar 20, 2019 · 7 comments
Assignees

Comments

@elRadix
Copy link

elRadix commented Mar 20, 2019

Can you add support for ARM images ? ie armhf for raspberry pi3

@elRadix elRadix changed the title Support for arm Support for ARM Mar 20, 2019
@ricardbejarano
Copy link
Owner

ricardbejarano commented Mar 21, 2019

I'll look into it!

I believe it's really interesting to have these tiny images support devices like the Raspberry Pi.

Supporting ARM requires the Docker Hub to support automated ARM builds, and I don't know if that's possible yet.

The build process for this image is fully automated using Docker Hub's automated builds. That's for a reason. The Docker Hub is owned by Docker, a public company with a reputation to keep, and for security reasons I put the trust on the integrity of this image on their hands, and don't build them myself and push them (like some other images do) because then you'd be trusting someone on the internet (me).

If you can confirm Docker Hub's support for automated ARM-based builds, I'd appreciate it, or else I'll dig into it myself.

@ricardbejarano ricardbejarano self-assigned this Mar 21, 2019
@elRadix
Copy link
Author

elRadix commented Mar 21, 2019

You could look at https://www.linuxserver.io/ how they do it, they auto build images with their jenkins server and using the kind of the same base images and pushed to docker hub
image

edit:

you can check this post as well
docker/hub-feedback#1261

@ricardbejarano
Copy link
Owner

I have to say I don't like linuxserver's approach very much.

Regarding that last link, if I understood correctly, users can run arbitrary code on Docker Hub's machines? Such as to install QEMU and emulate ARM on the very server?

@ricardbejarano
Copy link
Owner

After investigating the issue, I've concluded the following:

  • linuxserver's approach brings back the trust to me, which I don't like and wouldn't like the maintainer of an image I use do it to me (for the reasons I've exposed before), and

  • the second approach (using a hook before building on the Docker Hub to install QEMU in order to emulate ARM) feels way too hacky and inelegant.

Therefore, in the absence of any other ideas on how to bring ARM support to this image (which I've stated before I'd like to have), and until the Docker Hub does not support native ARM builds, I won't add ARM-based images.

Feel free to contribute other ideas down below.

I'm keeping this open for visibility.

@ricardbejarano
Copy link
Owner

@elRadix I've recently added ARM support to my prometheus, pushgateway, alertmanager, blackbox_exporter, node_exporter and snmp_exporter images.

I've done so in order to run them in a Docker daemon running in a Raspberry Pi 4B, and without building the images myself and pushing them later (neither manually nor through Jenkins or other build server).

The reason I could do so is because those 6 packages are written in Go, and Go's official compiler supports building binaries for any given support OS/architecture regardless of which OS+architecture you are running it (see the GOOS and GOARCH compiler env. variables). Thus, I can build ARM images in Docker Hub and Quay.

Do you know of any similar mechanisms to build ARM binaries from x86 workstations?

@ricardbejarano
Copy link
Owner

@elRadix I'm happy to announce that I'm reworking all my Docker images, together with my build process, and since I'm switching to GitHub Actions for building images, I will be able to provide ARM-based build for all my images.

Stay tuned!

@ricardbejarano
Copy link
Owner

Unfortunately, compiling for ARM failed (see GitHub Actions run logs).

I'm open (and willing) to provide ARM support for all my images, but I'd need someone to provide the necessary tweaks to the current Dockerfile so that it doesn't fail during ./configure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants