Skip to content
Merged
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
7 changes: 5 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ RUN apt-get update \
libextutils-helpers-perl \
libextutils-installpaths-perl \
libextutils-xsbuilder-perl \
libfile-copy-recursive-perl \
libfile-find-rule-perl-perl \
libfile-sharedir-install-perl \
libfuture-asyncawait-perl \
Expand Down Expand Up @@ -131,7 +132,6 @@ RUN apt-get update \
libphp-serialization-perl \
libpod-wsdl-perl \
libsoap-lite-perl \
libsql-abstract-classic-perl \
libsql-abstract-perl \
libstring-shellquote-perl \
libsub-uplevel-perl \
Expand Down Expand Up @@ -213,6 +213,7 @@ COPY --from=base /opt/base/pg $APP_ROOT/pg

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

RUN echo "PATH=$PATH:$APP_ROOT/webwork2/bin" >> /root/.bashrc \
&& mkdir /run/webwork2 /etc/ssl/local \
Expand All @@ -230,7 +231,9 @@ RUN echo "PATH=$PATH:$APP_ROOT/webwork2/bin" >> /root/.bashrc \
&& cd $PG_ROOT/htdocs \
&& npm install \
&& patch -p1 -d / < /tmp/imagemagick-allow-pdf-read.patch \
&& rm /tmp/imagemagick-allow-pdf-read.patch
&& rm /tmp/imagemagick-allow-pdf-read.patch \
&& patch -p1 -d / < /tmp/pgfsys-dvisvmg-bbox-fix.patch \
&& rm /tmp/pgfsys-dvisvmg-bbox-fix.patch

# ==================================================================
# Phase 7 - Final setup and prepare docker-entrypoint.sh
Expand Down
4 changes: 2 additions & 2 deletions DockerfileStage1
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ RUN apt-get update \
libextutils-helpers-perl \
libextutils-installpaths-perl \
libextutils-xsbuilder-perl \
libfile-copy-recursive-perl \
libfile-find-rule-perl-perl \
libfile-sharedir-install-perl \
libfuture-asyncawait-perl \
Expand Down Expand Up @@ -93,7 +94,6 @@ RUN apt-get update \
libphp-serialization-perl \
libpod-wsdl-perl \
libsoap-lite-perl \
libsql-abstract-classic-perl \
libsql-abstract-perl \
libstring-shellquote-perl \
libsub-uplevel-perl \
Expand Down Expand Up @@ -139,7 +139,7 @@ RUN apt-get update \
texlive-xetex \
tzdata \
zip $ADDITIONAL_BASE_IMAGE_PACKAGES \
&& curl -fsSL https://deb.nodesource.com/setup_16.x | bash - \
&& curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
&& apt-get install -y --no-install-recommends --no-install-suggests nodejs \
&& apt-get clean \
&& rm -fr /var/lib/apt/lists/* /tmp/*
Expand Down
5 changes: 4 additions & 1 deletion DockerfileStage2
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ COPY --from=base /opt/base/pg $APP_ROOT/pg

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

RUN echo "PATH=$PATH:$APP_ROOT/webwork2/bin" >> /root/.bashrc \
&& mkdir /run/webwork2 /etc/ssl/local \
Expand All @@ -92,7 +93,9 @@ RUN echo "PATH=$PATH:$APP_ROOT/webwork2/bin" >> /root/.bashrc \
&& cd $PG_ROOT/htdocs \
&& npm install \
&& patch -p1 -d / < /tmp/imagemagick-allow-pdf-read.patch \
&& rm /tmp/imagemagick-allow-pdf-read.patch
&& rm /tmp/imagemagick-allow-pdf-read.patch \
&& patch -p1 -d / < /tmp/pgfsys-dvisvmg-bbox-fix.patch \
&& rm /tmp/pgfsys-dvisvmg-bbox-fix.patch

# ==================================================================
# Phase 5 - Final setup and prepare docker-entrypoint.sh
Expand Down
3 changes: 2 additions & 1 deletion docker-config/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,8 @@ chmod ug+w htdocs/tmp

# Even if the admin and courses directories already existed their permissions
# might not be correct.
# chown www-data:www-data $APP_ROOT/courses
chown www-data:www-data $APP_ROOT/courses
chown www-data:www-data $APP_ROOT/courses/admin
chown www-data:www-data $APP_ROOT/courses/admin/*

# Symbolic links which have no target outside the Docker container
Expand Down
19 changes: 19 additions & 0 deletions docker-config/pgfsys-dvisvmg-bbox-fix.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
--- a/usr/share/texlive/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvisvgm.def 2024-02-22 13:30:26.167777811 -0600
+++ b/usr/share/texlive/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvisvgm.def 2024-02-22 13:36:29.820956330 -0600
@@ -127,7 +127,15 @@
\dp#1=0pt%
\leavevmode%
\pgf@xa=\pgf@trimleft@final\relax \ifdim\pgf@xa=0pt \else\kern\pgf@xa\fi%
- \raise-\pgf@ya\hbox{\ifpgf@sys@svg@inpicture\else\special{dvisvgm:bbox \pgf@sys@tonumber\pgf@picmaxx\space\pgf@sys@tonumber\pgf@picmaxy}\fi\box#1}%
+ \raise-\pgf@ya\hbox{%
+ \ifpgf@sys@svg@inpicture
+ \box#1%
+ \else
+ \special{dvisvgm:bbox \pgf@sys@tonumber\pgf@picmaxx\space\pgf@sys@tonumber\pgf@picmaxy}%
+ \special{dvisvgm:bbox lock}%
+ \box#1%
+ \special{dvisvgm:bbox unlock}%
+ \fi}%
\pgf@xa=\pgf@trimright@final\relax \ifdim\pgf@xa=0pt \else\kern\pgf@xa\fi%
}