From d4958d23d19baa752487622b28cffae12d3d8c26 Mon Sep 17 00:00:00 2001 From: Glenn Rice Date: Thu, 22 Feb 2024 14:24:13 -0600 Subject: [PATCH] Update and fix the docker build. The dependence on File::Copy::Recursive module was added in #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. --- Dockerfile | 2 +- DockerfileStage1 | 4 ++-- docker-config/docker-entrypoint.sh | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index f735e07e69..42eee229fc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 \ @@ -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 \ diff --git a/DockerfileStage1 b/DockerfileStage1 index 85357f3597..19f17bdc96 100644 --- a/DockerfileStage1 +++ b/DockerfileStage1 @@ -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 \ @@ -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 \ @@ -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/* diff --git a/docker-config/docker-entrypoint.sh b/docker-config/docker-entrypoint.sh index d7a5a07968..4fd08d87a5 100755 --- a/docker-config/docker-entrypoint.sh +++ b/docker-config/docker-entrypoint.sh @@ -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