diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..9e80076 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,23 @@ +FROM fedora:40 + +LABEL maintainer="TechTransThai" \ + description="Fedora image for BOINC client." + +# Global environment settings +ENV BOINC_GUI_RPC_PASSWORD="123" \ + BOINC_REMOTE_HOST="127.0.0.1" \ + BOINC_CMD_LINE_OPTIONS="" + +# Copy files +COPY bin/ /usr/bin/ + +# Configure +WORKDIR /var/lib/boinc + +# BOINC RPC port +EXPOSE 31416 + +# Install +RUN dnf install boinc-client -y + +CMD ["start-boinc.sh"] diff --git a/bin/start-boinc.sh b/bin/start-boinc.sh new file mode 100755 index 0000000..49a398a --- /dev/null +++ b/bin/start-boinc.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +# Configure the GUI RPC +echo $BOINC_GUI_RPC_PASSWORD > /var/lib/boinc/gui_rpc_auth.cfg +echo $BOINC_REMOTE_HOST > /var/lib/boinc/remote_hosts.cfg + +# Run BOINC. Full path needs for GPU support. +exec /usr/bin/boinc $BOINC_CMD_LINE_OPTIONS