Skip to content

Commit

Permalink
Update and fix the docker build.
Browse files Browse the repository at this point in the history
The dependence on File::Copy::Recursive module was added in openwebwork#2172, but
not added to the docker build.

Start using node 20 in the docker build.  The node 16 install script
from nodesource is deprecated, and they have imposed a 60 second install
delay when you use it.

Fix the ownership on the courses directory and admin course directory
when the docker entrypoint runs.  Fixing the ownership on the courses
directory and admin course directory will not cause any slow down to the
execution of that script.  It is not a recursive ownership change, just
two directories for which ownership is changed which is super fast.
  • Loading branch information
drgrice1 committed Feb 22, 2024
1 parent 8e3ca63 commit d4958d2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion 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
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
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

0 comments on commit d4958d2

Please sign in to comment.