Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# controls which TAGs to build. should be either "TAG=-b2d" to build the server with
# boinc2docker installed, or blank ("TAG=") to build the vanilla server
TAG=-b2d
TAG=



Expand Down
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "images/makeproject/boinc2docker"]
path = images/makeproject/boinc2docker
url = https://github.com/marius311/boinc2docker.git
[submodule "images/makeproject/boinc"]
path = images/makeproject/boinc
url = https://github.com/boinc/boinc.git
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ To check out this repository and get a test server fully up and running, simply
git clone https://github.com/marius311/boinc-server-docker.git
cd boinc-server-docker
docker-compose pull
docker-compose up -d
export URL_BASE='http://127.0.0.1' && docker-compose up -d # specify the ip address or hostname of your server, if you skip export, it will default to 127.0.0.1
```

You can now visit the server webpage and connect clients to the server at http://127.0.0.1/boincserver.
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ volumes:
project:
results:
secrets:
apachelogs:

services:
mysql:
Expand Down Expand Up @@ -50,6 +51,7 @@ services:
- "secrets:/run/secrets"
- "/dev/null:/run/secrets/keys/code_sign_private"
- "/var/run/docker.sock:/var/run/docker.sock"
- "apachelogs:/var/log/apache2"
ports:
- "80:80"
tty: true
Expand Down
104 changes: 45 additions & 59 deletions docs/cookbook.md

Large diffs are not rendered by default.

18 changes: 11 additions & 7 deletions images/apache/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
ARG TAG

#=====================================
FROM php:7.0.31-apache-stretch AS base
FROM php:apache-bookworm AS base
#=====================================

LABEL maintainer="Marius Millea <[email protected]>"
Expand All @@ -15,21 +15,24 @@ RUN apt-get update \
inotify-tools \
libjpeg62-turbo-dev \
libpng-dev \
libmariadbclient18 \
libmariadb3 \
libmariadbd19 \
mariadb-client-core \
nano \
openssl \
python \
python3 \
rsyslog \
supervisor \
vim-tiny \
python-is-python3 \
wget \
&& wget https://github.com/bobthecow/psysh/releases/download/v0.10.9/psysh-v0.10.9.tar.gz -O - | tar xz -C /usr/bin \
&& chmod +x /usr/bin/psysh \
&& rm -rf /var/lib/apt/lists

# configure server
RUN docker-php-ext-install mysqli \
&& docker-php-ext-configure gd --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-configure gd --with-jpeg=/usr/include/ \
&& docker-php-ext-install gd \
&& a2enmod cgi

Expand All @@ -42,8 +45,6 @@ COPY makeproject-step3.sh /usr/bin/
COPY supervisord.conf /etc/supervisor/conf.d/
CMD ["/usr/bin/supervisord"]



#====================
FROM base AS base-b2d
#====================
Expand Down Expand Up @@ -76,14 +77,17 @@ ONBUILD RUN adduser $BOINC_USER --disabled-password --gecos ""
ONBUILD RUN adduser www-data $BOINC_USER

# ensure the project volumes have the right permissions when mounted
ONBUILD RUN mkdir $PROJECT_ROOT && chown $BOINC_USER:$BOINC_USER $PROJECT_ROOT
ONBUILD RUN mkdir $PROJECT_ROOT && chown -R $BOINC_USER:$BOINC_USER $PROJECT_ROOT && chown $BOINC_USER:$BOINC_USER $HOME

ONBUILD WORKDIR $PROJECT_ROOT

# remove symlinks so we can actually collect logs from apache
RUN rm /var/log/apache2/error.log /var/log/apache2/access.log && chown -R www-data /var/log/apache2 && chmod -R 644 /var/log/apache2

#================================
FROM apache AS apache-defaultargs
#================================

# this triggers the ONBUILD directives using the default ARGs so we also get a
# fully built example image
ONBUILD RUN chmod g+rx $HOME
6 changes: 6 additions & 0 deletions images/apache/logrotate
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,9 @@
daily
olddir .old
}
/var/log/apache2/* {
missingok
rotate 7
daily
olddir .old
}
5 changes: 3 additions & 2 deletions images/apache/makeproject-step3.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
#!/bin/bash

set -e
#set -e

cd $PROJECT_ROOT

# gives $BOINC_USER permission to run Docker commands
DOCKER_GID=$(stat -c '%g' /var/run/docker.sock)
addgroup -gid ${DOCKER_GID} docker
addgroup ${BOINC_USER} docker

# Apache needs +x to serve this directory
chmod g+x $HOME
while :
do

Expand Down
58 changes: 32 additions & 26 deletions images/makeproject/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
ARG TAG

#===============================
FROM debian:stretch-slim AS base
FROM debian:stable-slim AS base
#===============================

LABEL maintainer="Marius Millea <[email protected]>"
Expand All @@ -20,20 +20,25 @@ RUN apt-get update \
libssl-dev \
m4 \
make \
mysql-client \
php7.0-cli \
php7.0-mysql \
php7.0-xml \
default-mysql-client \
php8.2-cli \
php8.2-mysql \
php8.2-xml \
pkg-config \
python \
python3 \
python-mysqldb \
python3-mysqldb \
python3-dev \
python3-pip \
python-is-python3 \
&& rm -rf /var/lib/apt/lists
RUN apt-get install -y --no-install-recommends git make m4 pkg-config dh-autoreconf libmariadb-dev libssl-dev

RUN python3 -m pip install mysqlclient --break-system-packages
# get source and compile server
COPY --chown=1000 boinc /usr/local/boinc
RUN cd /usr/local/boinc && ./_autosetup && ./configure --disable-client --disable-manager && make
RUN cd /usr/local/boinc && ./_autosetup
RUN cd /usr/local/boinc && ./configure --disable-client --disable-manager
#RUN cd /usr/local/boinc && make CXXFLAGS="-Wno-deprecated-declarations -fpermissive"
RUN cd /usr/local/boinc && make

# project-making scripts
COPY makeproject-step1.sh makeproject-step2.sh /usr/local/bin/
Expand All @@ -45,22 +50,22 @@ COPY --chown=1000 html /.project_root/html/
COPY --chown=1000 secrets.env /run/secrets/

#==============================
FROM debian:stretch-slim AS b2d
FROM debian:bookworm-slim AS b2d
#==============================

# do boinc2docker as a separate stage so we don't have to keep re-downloading
# things whenever the build cache is invalidated

RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
python-yaml \
wget
#RUN apt-get update \
# && apt-get install -y --no-install-recommends \
# ca-certificates \
# python3-yaml \
# wget

# the version of vboxwrapper/iso/appver installed is specified in
# boinc2docker/boinc2docker.yml
COPY boinc2docker /root/boinc2docker
RUN /root/boinc2docker/boinc2docker_create_app --download_only
#COPY boinc2docker /root/boinc2docker
#RUN /root/boinc2docker/boinc2docker_create_app --download_only



Expand All @@ -70,14 +75,14 @@ FROM base AS base-b2d

# copy/install extra things needed for the `-b2d` version

RUN apt-get update \
&& apt-get install -y --no-install-recommends \
python-yaml \
wget \
&& rm -rf /var/lib/apt/lists

COPY --from=b2d --chown=1000 /root/boinc2docker $HOME/boinc2docker
ENV PATH=$HOME/boinc2docker:$PATH
#RUN apt-get update \
# && apt-get install -y --no-install-recommends \
# python3-yaml \
# wget \
# && rm -rf /var/lib/apt/lists
#
#COPY --from=b2d --chown=1000 /root/boinc2docker $HOME/boinc2docker
#ENV PATH=$HOME/boinc2docker:$PATH



Expand Down Expand Up @@ -108,8 +113,9 @@ ONBUILD USER $BOINC_USER


# build server
ARG CACHEBUST=0
ONBUILD RUN makeproject-step1.sh
ONBUILD RUN test -z "$TAG" || boinc2docker_create_app --projhome $PROJECT_ROOT
#ONBUILD RUN test -z "$TAG"
ONBUILD CMD makeproject-step2.sh

ONBUILD WORKDIR $PROJECT_ROOT
Expand Down
2 changes: 1 addition & 1 deletion images/makeproject/boinc
Submodule boinc updated 3550 files
1 change: 0 additions & 1 deletion images/makeproject/boinc2docker
Submodule boinc2docker deleted from 0a5104
2 changes: 1 addition & 1 deletion images/makeproject/html/inc/phpmailer
Submodule phpmailer updated 240 files
1 change: 1 addition & 0 deletions images/makeproject/makeproject-step1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ cp -rT /.project_root $PROJECT_ROOT
rm -rf /.project_root/*

chmod g+w $PROJECT_ROOT/download
chmod g+rx $HOME
rm -r $PROJECT_ROOT/log_*
mkdir $PROJECT_ROOT/html/stats_archive

Expand Down
1 change: 0 additions & 1 deletion images/makeproject/makeproject-step2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,4 @@ fi

bin/xadd
yes | bin/update_versions

touch $PROJECT_ROOT/.built_${PROJECT}
3 changes: 1 addition & 2 deletions images/mysql/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
#==================================
FROM mariadb:10.3.8-bionic AS mysql
FROM mariadb:lts AS mysql
#==================================

ENV MYSQL_ALLOW_EMPTY_PASSWORD=yes

#==============================
FROM mysql AS mysql-defaultargs
#==============================