nroi / flexo

a central pacman cache
MIT License
180 stars 10 forks source link

Provide multiarch Docker image #38

Open jhbruhn opened 3 years ago

jhbruhn commented 3 years ago

I am running flexo on a Raspberry Pi in a Docker container and love it so far. My only problem is the lack of a ARM image for Docker, so I currently build it myself locally. Luckily, no changes on the Dockerfile or flexo itself were necessary! But it would be nice if an official multi-arch image was provided so watchtower can automatically update flexo on my machine.

nroi commented 3 years ago

I've managed to build Flexo for ARM64 via buildx with GitHub's CI Pipeline, but for older versions (armv6, armv7), it seems there is a bug in buildx: https://github.com/docker/buildx/issues/395

So we'll have to wait until this is solved or someone comes up with a workaround. Until then, the CI is going to build for amd64 and arm64.

I'm still in the process of improving the CI for building docker images and will give you an update soon.

jhbruhn commented 3 years ago

https://github.com/docker/buildx/issues/395#issuecomment-749769678 mentions a workaround by doing the cargo fetch step in the arch of the current build step an then switching to the target architecture for building and running the application. Building on ARM should also still work using the workaround as the architecture used for fetching depends othe architecture the build is running on.

nroi commented 3 years ago

I have had some success with the workaround, but still no luck with armv6. Also, I wasn't able to push it to Docker Hub, I was only able to use github's GHCR.

So, the current status is:

nroi commented 3 years ago

For some reason, the CI job I've created at https://github.com/docker-flexo/docker-flexo often times out when building the ARM image. For now, I've removed the job that pushes the image to GHCR, so that means no ARM docker images are provided anymore.

I'm prioritizing other issues before this one, so please don't expect this to be solved anytime soon. If anyone wants to help, you can of course just fork this repo or this repo and try your luck. But for now, ARM users just have to build the Docker image themselves or use the AUR package.