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 arm64 images #18

Open
arminus opened this issue Aug 4, 2024 · 11 comments
Open

Support for arm64 images #18

arminus opened this issue Aug 4, 2024 · 11 comments
Labels
confirmed next step Anything that is confirmed for future versions in progress

Comments

@arminus
Copy link

arminus commented Aug 4, 2024

First of all, great idea and looking forward to the planned features!

Since my always-on box at home is a Pi4, I've tried to test this there by extending your Dockerfile for arm64, see here. Cross built the image (on a faster amd64) like so:

docker buildx create --name mybuilder --use
docker buildx inspect --bootstrap
docker buildx build --platform linux/arm64 -t pgbackweb:latest --output type=docker,dest=pgbackweb.tar .

Then, to bypass a docker registry for now, copied the image to the Pi4 and loaded it with

docker load -i pgbackweb.tar

Works like a charm.

In case you're interested, I'd create a PR, maybe I also have time to checkout how to set this up in a github build pipeline for arm64 but I haven't done this before so no promises ;-)

@eduardolat
Copy link
Owner

Great! It can be very useful, just make sure your PR doesn't add too much complexity to the project, as it's important to keep it as simple as possible.

Thanks for considering contributing to the project.

@arminus
Copy link
Author

arminus commented Aug 5, 2024

No complexity, it's just platform specific wgets in your Dockerfile, see #21

I see no github pipeline for how you build and publish your Docker image, so I can't automate that I'm afraid.

@ykrasik
Copy link

ykrasik commented Aug 12, 2024

+1 on this, please

@ThisIsBenny
Copy link

+1

@eduardolat eduardolat added in progress confirmed next step Anything that is confirmed for future versions labels Sep 7, 2024
@eduardolat
Copy link
Owner

Thanks @arminus for your great help.

Since you opened your pr, there have been many changes to the Dockerfiles, the base image has been changed, dependencies have been added, and many other things.

However, I have taken the changes proposed in your pr #21 and adapted them to the new Dockerfiles.

I have also included a script that checks that the dependencies are working correctly and I have added it to the github actions tests workflow.

All that is left is to add a github action to automatically publish the image in each release.

Everything is working perfectly and this will be published in the next release, thanks for your help and thanks to everyone for the interest in the project 🍻

image

@eduardolat
Copy link
Owner

This has been published in the v0.3.0 release https://github.com/eduardolat/pgbackweb/releases/tag/0.3.0

@ThisIsBenny
Copy link

I got the error:
exec user process caused: exec format error
Which usually happens when it is not an ARM64 image.
Is the image working for some one?

@eduardolat
Copy link
Owner

hey @ThisIsBenny, can you try to pull the latest version with this command?

docker pull --platform=linux/arm64 eduardolat/pgbackweb:0.3.0

And then explicitly set in your compose file the version of your image to

services:
  pgbackweb:
    image: eduardolat/pgbackweb:latest:0.3.0

## rest of your config

@eduardolat eduardolat reopened this Sep 9, 2024
@ThisIsBenny
Copy link

I have used it with my Raspberry PI Kubernetes Cluster, why i'm not able to specify the platform manually. But I have used the 0.3.0 Tag and also tried with the SHA hash of the Arm image like 0.3.0@sha....

@eduardolat
Copy link
Owner

Can you please try (just for test purposes) with the docker compose in the README.md?

@arminus
Copy link
Author

arminus commented Sep 11, 2024

docker pull --platform=linux/arm64 eduardolat/pgbackweb:0.3.0

then compose

image: eduardolat/pgbackweb:0.3.0

(note: 2 tags are illegal syntax)

does not work, still getting exec format error.

I assume the Manifest for the images is wrong or missing:

docker manifest inspect eduardolat/pgbackweb:0.3.0
no such manifest: docker.io/eduardolat/pgbackweb:0.3.0

Normally (with all other images I run on my Pi4), I don't have to explicitly set the platform when pulling, docker figures this out on its own if the images are configured properly (but I haven't built multiplatform images myself yet, so I can only guess here)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed next step Anything that is confirmed for future versions in progress
Projects
None yet
Development

No branches or pull requests

4 participants