Browse Source

Fix permission error and allow interactive mode in entrypoint.sh

master
Sander Bollen 2 years ago
parent
commit
f8051eb350
  1. 4
      Dockerfile
  2. 27
      entrypoint.sh

4
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"

27
entrypoint.sh

@ -1,11 +1,20 @@
#!/bin/bash
set -e
/opt/fahclient/FAHClient \
--user=${USER} \
--team=${TEAM} \
--passkey=${PASSKEY} \
--gpu=${ENABLE_GPU} \
--smp=${ENABLE_SMP} \
--power=full \
--gui-enabled=false \
${@}
# if a command was specified, we run that command. E.g. helpful when we do
# docker run -it <container> /bin/bash
if [ "${1}" ]
then
exec "$@"
# otherwise we attempt to run boinc.
else
/opt/fahclient/FAHClient \
--user="${USER}" \
--team="${TEAM}" \
--passkey="${PASSKEY}" \
--gpu="${ENABLE_GPU}" \
--smp="${ENABLE_SMP}" \
--power=full \
--gui-enabled=false \
"${@}"
fi
Loading…
Cancel
Save