1
0
Fork 0

Fix permission error and allow interactive mode in entrypoint.sh

This commit is contained in:
Sander Bollen 2020-03-06 00:26:05 +01:00
parent d65fe537bb
commit f8051eb350
2 changed files with 21 additions and 10 deletions

View File

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

View File

@ -1,11 +1,20 @@
#!/bin/bash
set -e
# 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} \
--user="${USER}" \
--team="${TEAM}" \
--passkey="${PASSKEY}" \
--gpu="${ENABLE_GPU}" \
--smp="${ENABLE_SMP}" \
--power=full \
--gui-enabled=false \
${@}
"${@}"
fi