Skip to content

Commit d2bb66e

Browse files
authored
Merge pull request #2449 from openwebwork/docker-build-ubuntu-24.04
Update the docker build to Ubuntu 24.04.
2 parents b6322b5 + 574ee82 commit d2bb66e

4 files changed

Lines changed: 6 additions & 18 deletions

File tree

Dockerfile

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ RUN echo Cloning branch $PG_BRANCH branch from $PG_GIT_URL \
3030

3131
# We need to change FROM before setting the ENV variables.
3232

33-
FROM ubuntu:22.04
33+
FROM ubuntu:24.04
3434

3535
ENV WEBWORK_URL=/webwork2 \
3636
WEBWORK_ROOT_URL=http://localhost::8080 \
@@ -110,8 +110,6 @@ RUN apt-get update \
110110
libjson-perl \
111111
libjson-xs-perl \
112112
liblocale-maketext-lexicon-perl \
113-
libmail-sender-perl \
114-
libmail-sender-perl \
115113
libmariadb-dev \
116114
libmath-random-secure-perl \
117115
libmime-base32-perl \
@@ -120,6 +118,7 @@ RUN apt-get update \
120118
libminion-perl \
121119
libmodule-build-perl \
122120
libmodule-pluggable-perl \
121+
libmojolicious-perl \
123122
libmojolicious-plugin-renderfile-perl \
124123
libnet-https-nb-perl \
125124
libnet-ip-perl \
@@ -189,8 +188,6 @@ RUN apt-get update \
189188
RUN cpanm install -n \
190189
Statistics::R::IO \
191190
DBD::MariaDB \
192-
Mojolicious \
193-
Mojo::SQLite@3.002 \
194191
Perl::Tidy@20220613 \
195192
Archive::Zip::SimpleZip \
196193
&& rm -fr ./cpanm /root/.cpanm /tmp/*
@@ -219,7 +216,6 @@ COPY --from=base /opt/base/pg $APP_ROOT/pg
219216
# 7. Apply patches
220217

221218
# Patch files that are applied below
222-
COPY docker-config/imagemagick-allow-pdf-read.patch /tmp
223219
COPY docker-config/pgfsys-dvisvmg-bbox-fix.patch /tmp
224220

225221
RUN echo "PATH=$PATH:$APP_ROOT/webwork2/bin" >> /root/.bashrc \
@@ -237,8 +233,6 @@ RUN echo "PATH=$PATH:$APP_ROOT/webwork2/bin" >> /root/.bashrc \
237233
&& npm install \
238234
&& cd $PG_ROOT/htdocs \
239235
&& npm install \
240-
&& patch -p1 -d / < /tmp/imagemagick-allow-pdf-read.patch \
241-
&& rm /tmp/imagemagick-allow-pdf-read.patch \
242236
&& patch -p1 -d / < /tmp/pgfsys-dvisvmg-bbox-fix.patch \
243237
&& rm /tmp/pgfsys-dvisvmg-bbox-fix.patch
244238

DockerfileStage1

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This is the Stage 1 Dockerfile, which builds a base OS image (webwork-base)
22
# on top of which the WeBWorK parts will be installed by the Stage 2 Dockerfile.
33

4-
FROM ubuntu:22.04
4+
FROM ubuntu:24.04
55

66
# ==================================================================
77
# Phase 1 - Set base OS image install stage ENV variables
@@ -72,8 +72,6 @@ RUN apt-get update \
7272
libjson-perl \
7373
libjson-xs-perl \
7474
liblocale-maketext-lexicon-perl \
75-
libmail-sender-perl \
76-
libmail-sender-perl \
7775
libmariadb-dev \
7876
libmath-random-secure-perl \
7977
libmime-base32-perl \
@@ -82,6 +80,7 @@ RUN apt-get update \
8280
libminion-perl \
8381
libmodule-build-perl \
8482
libmodule-pluggable-perl \
83+
libmojolicious-perl \
8584
libmojolicious-plugin-renderfile-perl \
8685
libnet-https-nb-perl \
8786
libnet-ip-perl \
@@ -151,8 +150,6 @@ RUN apt-get update \
151150
RUN cpanm install -n \
152151
Statistics::R::IO \
153152
DBD::MariaDB \
154-
Mojolicious \
155-
Mojo::SQLite@3.002 \
156153
Perl::Tidy@20220613 \
157154
Archive::Zip::SimpleZip \
158155
&& rm -fr ./cpanm /root/.cpanm /tmp/*

DockerfileStage2

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ RUN echo Cloning branch $PG_BRANCH branch from $PG_GIT_URL \
3333

3434
# We need to change FROM before setting the ENV variables.
3535

36-
FROM webwork-base:forWW218
36+
FROM webwork-base:forWW219
3737

3838
ENV WEBWORK_URL=/webwork2 \
3939
WEBWORK_ROOT_URL=http://localhost::8080 \
@@ -74,7 +74,6 @@ COPY --from=base /opt/base/pg $APP_ROOT/pg
7474
# 7. Apply patches
7575

7676
# Patch files that are applied below
77-
COPY docker-config/imagemagick-allow-pdf-read.patch /tmp
7877
COPY docker-config/pgfsys-dvisvmg-bbox-fix.patch /tmp
7978

8079
RUN echo "PATH=$PATH:$APP_ROOT/webwork2/bin" >> /root/.bashrc \
@@ -92,8 +91,6 @@ RUN echo "PATH=$PATH:$APP_ROOT/webwork2/bin" >> /root/.bashrc \
9291
&& npm install \
9392
&& cd $PG_ROOT/htdocs \
9493
&& npm install \
95-
&& patch -p1 -d / < /tmp/imagemagick-allow-pdf-read.patch \
96-
&& rm /tmp/imagemagick-allow-pdf-read.patch \
9794
&& patch -p1 -d / < /tmp/pgfsys-dvisvmg-bbox-fix.patch \
9895
&& rm /tmp/pgfsys-dvisvmg-bbox-fix.patch
9996

docker-config/docker-compose.dist.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ services:
9797
# If you would like a 1 stage build process comment out the next line, and just run "docker-compose build".
9898
dockerfile: DockerfileStage2
9999
# For the 2 stage build process run
100-
# docker build --tag webwork-base:forWW218 -f DockerfileStage1 .
100+
# docker build --tag webwork-base:forWW219 -f DockerfileStage1 .
101101
# and then
102102
# docker-compose build
103103
# When rebuilding to get updated images add the "--no-cache" option to both commands.

0 commit comments

Comments
 (0)