nning / transmission-rss

Adds torrents from RSS feeds to Transmission web frontend
GNU General Public License v3.0
450 stars 47 forks source link

arm based docker images? #96

Open pfremm opened 4 years ago

pfremm commented 4 years ago

I noticed no arm based docker builds exist for pis or other SBC boards? Is that something you are willing to do? Appears you could use a github action with buildx.

nning commented 4 years ago

Yes, that's an interesting suggestion! I will look into this later. Thanks!

pfremm commented 4 years ago

I got this working on a fork: https://github.com/pfremm/transmission-rss/blob/master/.github/workflows/main.yml

sedlund commented 4 years ago

This creates a 49MB image that runs on my Raspberry Pi 3B+ Cross built on AMD64

DockerfileCrossCompile.arm7hf

FROM balenalib/armv7hf-alpine:3.11 as builder

RUN [ "cross-build-start" ]
RUN apk add gcc libc-dev make ruby-dev
RUN gem install --build-root /build transmission-rss
RUN [ "cross-build-end" ]

###
FROM balenalib/armv7hf-alpine:3.11

RUN [ "cross-build-start" ]
RUN apk add --no-cache ruby ruby-etc ruby-json
RUN [ "cross-build-end" ]
COPY --from=builder /build /

CMD ["transmission-rss"]
pfremm commented 4 years ago

I needed aarch64. Buildx is really a easier in my opinion for multi architecture

nning commented 4 years ago

Let's keep this open. I want to configure the Travis CI build to also generate arm64 images or migrate to GitHub Actions in the future.

sedlund commented 4 years ago

After setting up buildx (I hadn't heard of it before) I agree it's the better way to go. Although it is not 'production' ready per Docker Inc, or as easy to get going as using the Balena crossbuild images. This is nice because you can use one Dockerfile for all platforms and use one build command to build for many platforms at once. Depending on the backend it can do parallel build on multiple machines.

To the above Dockerfile (using official Alpine image) I had to add libgcc package in the final stage to the apk list. The resultant image is 21.9MB for armhf

marazmarci commented 2 years ago

A side note for Docker image sizes: Creating Smaller Docker Images - Ian Lewis