You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2023/10/25 15:00:03 UTC

[allura] 01/02: [#8524] upgraded installation steps for Node v16

This is an automated email from the ASF dual-hosted git repository.

brondsem pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/allura.git

commit b4bb8277c3a34fe428bdb1c46320884f9abf0c18
Author: Guillermo Cruz <gu...@slashdotmedia.com>
AuthorDate: Mon Oct 23 15:02:39 2023 -0600

    [#8524] upgraded installation steps for Node v16
---
 Allura/docs/getting_started/install_each_step.rst |  8 +++-----
 Dockerfile                                        | 10 ++++++++--
 2 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/Allura/docs/getting_started/install_each_step.rst b/Allura/docs/getting_started/install_each_step.rst
index 264b37f08..737ae613d 100644
--- a/Allura/docs/getting_started/install_each_step.rst
+++ b/Allura/docs/getting_started/install_each_step.rst
@@ -195,18 +195,16 @@ Allura uses a background task service called "taskd" to do async tasks like send
 A few more steps, if using git
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-If you're using a released version of Allura, these are already done for you.  These commands will prepare final JS & CSS files.
-For non-Ubuntu installations see https://nodejs.org/en/download/package-manager/ for other options to replace the first line here:
+If you're using a released version of Allura, these are already done for you.
+
+Otherwise, install nodejs via the `Ubuntu instructions <https://github.com/nodesource/distributions#installation-instructions>`_ or `other instructions <https://nodejs.org/en/download/package-manager/>`_.  Then run:
 
 .. code-block:: bash
 
-    (env-allura)~$ curl --silent --location https://deb.nodesource.com/setup_14.x | sudo bash -
-    (env-allura)~$ sudo apt-get install nodejs
     (env-allura)~$ cd ~/src/allura
     (env-allura)~$ npm ci
     (env-allura)~$ npm run build
 
-
 The application server
 ~~~~~~~~~~~~~~~~~~~~~~
 
diff --git a/Dockerfile b/Dockerfile
index c5e254ed1..4ceeb4fb7 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -19,6 +19,8 @@ FROM ubuntu:22.04
 
 ARG PY_VERSION=3.11
 
+ARG NODE_MAJOR=16
+
 # FIXME: change this?
 # Ubunutu 18.04's latest python is 3.6 (and Ubuntu 20.04's is 3.8)
 # In order to get a different python, we must add the deadsnakes apt repo, and install a specific version
@@ -56,8 +58,12 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
 ENV PYTHON_EXE=python$PY_VERSION
 
 # up-to-date version of node & npm
-RUN curl --silent --location https://deb.nodesource.com/setup_14.x | sudo bash - && \
-    DEBIAN_FRONTEND=noninteractive apt-get install --yes --no-install-recommends nodejs
+RUN apt-get install -y ca-certificates curl gpg
+RUN mkdir -p /etc/apt/keyrings
+RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
+RUN 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
+RUN apt-get update
+RUN apt-get install nodejs -y
 
 # Snapshot generation for SVN (and maybe other SCMs) might fail without this
 RUN locale-gen en_US.UTF-8