Add tested Alpine-derived distroless rTorrent variant
Build and Push Docker Image / build (push) Successful in 38s
Build and Push Docker Image / build (push) Successful in 38s
This commit is contained in:
1 parent
4ac29238fe
commit
8b88089cb4
7 files changed
+307
No files matched your search
@@ -0,0 +1,21 @@
|
||||
# Keep Alpine's musl ABI and rTorrent version; export only runtime dependencies.
|
||||
FROM alpine:3.24 AS runtime
|
||||
RUN apk add --no-cache rtorrent ca-certificates tzdata \
|
||||
build-base lddtreepax python3
|
||||
COPY install/rtorrent-entrypoint.c /build/rtorrent-entrypoint.c
|
||||
RUN cc -Os -Wall -Wextra -Werror -o /usr/local/bin/rtorrent-entrypoint /build/rtorrent-entrypoint.c \
|
||||
&& strip /usr/local/bin/rtorrent-entrypoint
|
||||
COPY build/runtime-root.py /build/runtime-root.py
|
||||
RUN python3 /build/runtime-root.py /runtime /usr/bin/rtorrent /usr/local/bin/rtorrent-entrypoint
|
||||
COPY tests/rtorrent-smoke.c /build/rtorrent-smoke.c
|
||||
RUN cc -static -Os -Wall -Wextra -Werror -o /build/rtorrent-smoke /build/rtorrent-smoke.c
|
||||
|
||||
FROM scratch
|
||||
COPY --from=runtime /runtime/ /
|
||||
ENV HOME=/root PATH=/usr/local/bin:/usr/bin:/bin TERM=xterm
|
||||
RUN --mount=type=bind,from=runtime,source=/build/rtorrent-smoke,target=/ci-smoke ["/ci-smoke"]
|
||||
VOLUME ["/home/nfs_download"]
|
||||
EXPOSE 5001/tcp
|
||||
HEALTHCHECK --interval=10s --timeout=10s --start-period=90s --retries=5 \
|
||||
CMD ["/usr/local/bin/rtorrent-entrypoint", "--healthcheck"]
|
||||
ENTRYPOINT ["/usr/local/bin/rtorrent-entrypoint"]
|
||||
Reference in new issue
Block a user