From f647eec257f0ba66087ae27428123abcd4205619 Mon Sep 17 00:00:00 2001 From: retr0 Date: Fri, 18 Jul 2025 19:37:27 +0200 Subject: [PATCH] Integrate Linuxserver approach with HAOS config --- Dockerfile | 55 ++++++++++++----------------------------------------- config.yaml | 2 +- 2 files changed, 13 insertions(+), 44 deletions(-) diff --git a/Dockerfile b/Dockerfile index eba83cb..0dee980 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,47 +1,16 @@ -# syntax=docker/dockerfile:1 +FROM lscr.io/linuxserver/unraid-baseimage:debian -FROM ghcr.io/linuxserver/baseimage-ubuntu:noble +# Install dependencies and fahclient +RUN apt-get update && apt-get install -y curl gnupg && \ + curl -o /tmp/fahclient.deb -L "https://download.foldingathome.org/releases/public/fah-client/debian-10-64bit/release/fah-client_8.4.9_amd64.deb" && \ + dpkg -i /tmp/fahclient.deb && apt-get install -f -y && \ + rm /tmp/fahclient.deb && apt-get clean -# set version label -ARG BUILD_DATE -ARG VERSION -ARG FOLDINGATHOME_RELEASE -LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" -LABEL maintainer="aptalca" - -#Add needed nvidia environment variables for container toolkit -ENV NVIDIA_DRIVER_CAPABILITIES="compute,video,utility" - -# global environment settings -ENV DEBIAN_FRONTEND="noninteractive" - -RUN \ - echo "**** install runtime packages ****" && \ - apt-get update && \ - apt-get install -y \ - bzip2 \ - intel-opencl-icd \ - libexpat1 && \ - ln -s libOpenCL.so.1 /usr/lib/x86_64-linux-gnu/libOpenCL.so && \ - echo "**** install foldingathome ****" && \ - download_url="https://download.foldingathome.org/releases/public/fah-client/"$(curl -s https://download.foldingathome.org/releases/public/fah-client/meta.json | jq -r '.[] | select((.package | contains("debian")) and (.package | contains("release"))) | .package' | grep -v "arm64" | grep "tar.bz2") && \ - curl -o \ - /tmp/fah.tar.bz2 -L \ - ${download_url} && \ - tar xf /tmp/fah.tar.bz2 -C /app --strip-components=1 && \ - printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \ - echo "**** cleanup ****" && \ - apt-get clean && \ - rm -rf \ - /tmp/* \ - /var/lib/apt/lists/* \ - /var/tmp/* \ - /var/log/* - -# add local files +# Add local files COPY root/ / -# ports and volumes -EXPOSE 7396 - -VOLUME /config \ No newline at end of file +# Environment and entrypoint +ENV HOME="/config" \ + CLI_ARGS="" +ENTRYPOINT ["/init"] +CMD ["/usr/bin/fahclient", "--config", "/config/config.xml", "${CLI_ARGS}"] \ No newline at end of file diff --git a/config.yaml b/config.yaml index 7a2d8f1..e69ac21 100644 --- a/config.yaml +++ b/config.yaml @@ -2,7 +2,7 @@ name: Folding@home version: 0.8.0 slug: foldingathome description: Run Folding@home to contribute to scientific research -url: http://deine-gitea-url/dein-benutzername/dont-stop-folding +url: https://gitea.bitfire.work/retr0/dont-stop-folding arch: - amd64 - armhf