Fix permission error and allow interactive mode in entrypoint.sh
This commit is contained in:
parent
d65fe537bb
commit
f8051eb350
|
@ -18,7 +18,9 @@ RUN useradd --system folding && \
|
||||||
apt-get autoremove --yes && \
|
apt-get autoremove --yes && \
|
||||||
rm -rf /var/lib/apt/lists/*
|
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 USER "Anonymous"
|
||||||
ENV TEAM "0"
|
ENV TEAM "0"
|
||||||
|
|
|
@ -1,11 +1,20 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
/opt/fahclient/FAHClient \
|
# if a command was specified, we run that command. E.g. helpful when we do
|
||||||
--user=${USER} \
|
# docker run -it <container> /bin/bash
|
||||||
--team=${TEAM} \
|
if [ "${1}" ]
|
||||||
--passkey=${PASSKEY} \
|
then
|
||||||
--gpu=${ENABLE_GPU} \
|
exec "$@"
|
||||||
--smp=${ENABLE_SMP} \
|
# otherwise we attempt to run boinc.
|
||||||
|
else
|
||||||
|
/opt/fahclient/FAHClient \
|
||||||
|
--user="${USER}" \
|
||||||
|
--team="${TEAM}" \
|
||||||
|
--passkey="${PASSKEY}" \
|
||||||
|
--gpu="${ENABLE_GPU}" \
|
||||||
|
--smp="${ENABLE_SMP}" \
|
||||||
--power=full \
|
--power=full \
|
||||||
--gui-enabled=false \
|
--gui-enabled=false \
|
||||||
${@}
|
"${@}"
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in a new issue