diff --git a/Dockerfile b/Dockerfile index f0b1c91..c52f489 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,9 @@ RUN useradd --system folding && \ apt-get autoremove --yes && \ rm -rf /var/lib/apt/lists/* -COPY entrypoint.sh /opt/fahclient +COPY --chown=folding:folding entrypoint.sh /opt/fahclient + +RUN chmod +x /opt/fahclient/entrypoint.sh ENV USER "Anonymous" ENV TEAM "0" diff --git a/entrypoint.sh b/entrypoint.sh index c98ba75..5f08480 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,11 +1,12 @@ #!/bin/bash +set -e /opt/fahclient/FAHClient \ - --user=${USER} \ - --team=${TEAM} \ - --passkey=${PASSKEY} \ - --gpu=${ENABLE_GPU} \ - --smp=${ENABLE_SMP} \ + --user="${USER}" \ + --team="${TEAM}" \ + --passkey="${PASSKEY}" \ + --gpu="${ENABLE_GPU}" \ + --smp="${ENABLE_SMP}" \ --power=full \ --gui-enabled=false \ - ${@} + "${@}"