From a7c7f69b12bf2499cb3f4200f2f8f7032bb6c2bf Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Wed, 1 Nov 2023 14:56:22 +0100 Subject: [PATCH] Replace the nodesource setup script with the updated node installation steps (also update to node 20) --- docker/php-fpm/Dockerfile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docker/php-fpm/Dockerfile b/docker/php-fpm/Dockerfile index d4e675ba..91656a58 100644 --- a/docker/php-fpm/Dockerfile +++ b/docker/php-fpm/Dockerfile @@ -4,6 +4,9 @@ WORKDIR "/var/www/html" RUN apt-get update \ && apt-get install -y --no-install-recommends \ + curl \ + ca-certificates \ + gnupg \ git \ zip \ unzip \ @@ -11,7 +14,11 @@ RUN apt-get update \ curl gd intl ldap mbstring mysqli odbc pdo pdo_mysql soap sockets xml zip xdebug exif sqlite3 gettext bcmath csv event imap inotify mcrypt redis \ && docker-php-ext-enable xdebug \ && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ - && curl -sLS https://deb.nodesource.com/setup_18.x | bash - \ + && mkdir -p /etc/apt/keyrings \ + && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \ + && NODE_MAJOR=20 \ + && echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \ + && apt-get update \ && apt-get install -y nodejs \ && npm install -g npm \ && apt-get install -q -y ssmtp mailutils \