Skip to content

Commit 83b228a

Browse files
committed
Update the docker build.
Update to node 24 in the build instead of node 20. Update the Perl::Tidy version to the version currently used in development. Don't install the `Statistics::R::IO` module. That is not used anymore. Update to the mariadb 10.11 docker image for the database volume. That should have been done before when I updated the docker build to Ubuntu 24. That matches the version of mariadb in Ubuntu 24. Remove the `--db-layout` option that was passed to the `addcourse` script. That is not valid for the script anymore. Note that this depends on openwebwork#2957, since the docker build will fail without the bug in the `addcourse` script fixed.
1 parent 5c46f16 commit 83b228a

4 files changed

Lines changed: 14 additions & 16 deletions

File tree

Dockerfile

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ RUN apt-get update \
174174
texlive-xetex \
175175
tzdata \
176176
zip $ADDITIONAL_BASE_IMAGE_PACKAGES \
177-
&& curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
177+
&& curl -fsSL https://deb.nodesource.com/setup_24.x | bash - \
178178
&& apt-get install -y --no-install-recommends --no-install-suggests nodejs \
179179
&& apt-get clean \
180180
&& rm -fr /var/lib/apt/lists/* /tmp/*
@@ -183,9 +183,8 @@ RUN apt-get update \
183183
# Phase 4 - Install additional Perl modules from CPAN that are not packaged for Ubuntu or are outdated in Ubuntu.
184184

185185
RUN cpanm install -n \
186-
Statistics::R::IO \
187186
DBD::MariaDB \
188-
Perl::Tidy@20220613 \
187+
Perl::Tidy@20240903 \
189188
Archive::Zip::SimpleZip \
190189
Net::SAML2 \
191190
&& rm -fr ./cpanm /root/.cpanm /tmp/*
@@ -219,18 +218,18 @@ COPY docker-config/pgfsys-dvisvmg-bbox-fix.patch /tmp
219218
RUN echo "PATH=$PATH:$APP_ROOT/webwork2/bin" >> /root/.bashrc \
220219
&& mkdir /run/webwork2 /etc/ssl/local \
221220
&& cd $APP_ROOT/webwork2/ \
222-
&& chown www-data DATA ../courses logs tmp /etc/ssl/local /run/webwork2 \
223-
&& chmod -R u+w DATA ../courses logs tmp /run/webwork2 /etc/ssl/local \
221+
&& chown www-data DATA ../courses logs tmp /etc/ssl/local /run/webwork2 \
222+
&& chmod -R u+w DATA ../courses logs tmp /run/webwork2 /etc/ssl/local \
224223
&& echo "en_US ISO-8859-1\nen_US.UTF-8 UTF-8" > /etc/locale.gen \
225-
&& /usr/sbin/locale-gen \
226-
&& echo "locales locales/default_environment_locale select en_US.UTF-8\ndebconf debconf/frontend select Noninteractive" > /tmp/preseed.txt \
227-
&& debconf-set-selections /tmp/preseed.txt \
224+
&& /usr/sbin/locale-gen \
225+
&& echo "locales locales/default_environment_locale select en_US.UTF-8\ndebconf debconf/frontend select Noninteractive" > /tmp/preseed.txt \
226+
&& debconf-set-selections /tmp/preseed.txt \
228227
&& rm /etc/localtime /etc/timezone && echo "Etc/UTC" > /etc/timezone \
229-
&& dpkg-reconfigure -f noninteractive tzdata \
228+
&& dpkg-reconfigure -f noninteractive tzdata \
230229
&& cd $WEBWORK_ROOT/htdocs \
231-
&& npm install \
230+
&& npm install \
232231
&& cd $PG_ROOT/htdocs \
233-
&& npm install \
232+
&& npm install \
234233
&& patch -p1 -d / < /tmp/pgfsys-dvisvmg-bbox-fix.patch \
235234
&& rm /tmp/pgfsys-dvisvmg-bbox-fix.patch
236235

DockerfileStage1

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ RUN apt-get update \
136136
texlive-xetex \
137137
tzdata \
138138
zip $ADDITIONAL_BASE_IMAGE_PACKAGES \
139-
&& curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
139+
&& curl -fsSL https://deb.nodesource.com/setup_24.x | bash - \
140140
&& apt-get install -y --no-install-recommends --no-install-suggests nodejs \
141141
&& apt-get clean \
142142
&& rm -fr /var/lib/apt/lists/* /tmp/*
@@ -145,9 +145,8 @@ RUN apt-get update \
145145
# Phase 3 - Install additional Perl modules from CPAN that are not packaged for Ubuntu or are outdated in Ubuntu.
146146

147147
RUN cpanm install -n \
148-
Statistics::R::IO \
149148
DBD::MariaDB \
150-
Perl::Tidy@20220613 \
149+
Perl::Tidy@20240903 \
151150
Archive::Zip::SimpleZip \
152151
Net::SAML2 \
153152
&& rm -fr ./cpanm /root/.cpanm /tmp/*

docker-config/docker-compose.dist.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
services:
22
db:
3-
image: mariadb:10.4
3+
image: mariadb:10.11
44

55
# Set a fixed container name, so it does not depend on the directory name
66
container_name: webwork2_db_1

docker-config/docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ if [ ! -d "$APP_ROOT/courses/admin" ]; then
102102
umask 2
103103
cd $APP_ROOT/courses
104104
wait_for_db
105-
$WEBWORK_ROOT/bin/addcourse admin --db-layout=sql_single --users=$WEBWORK_ROOT/courses.dist/adminClasslist.lst --professors=admin
105+
$WEBWORK_ROOT/bin/addcourse admin --users=$WEBWORK_ROOT/courses.dist/adminClasslist.lst --professors=admin
106106
chown www-data:www-data -R $APP_ROOT/courses
107107
echo "Admin course is created."
108108
echo "user: admin password: admin added to course admin and tables upgraded"

0 commit comments

Comments
 (0)