Skip to content

Commit 5ddfaf7

Browse files
committed
fix: use latest NodeSource installation script
because with the previous method, we were getting the following error: ```console > [web production 13/17] RUN npm install -D mjml@"^4.14.1": 0.088 /bin/sh: 1: npm: not found ``` See the following for more details: - nodesource/distributions#1770 (comment) - nodesource/distributions#1601 (comment)
1 parent 923acdb commit 5ddfaf7

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

{{cookiecutter.project_slug}}/Dockerfile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,8 @@ RUN apt-get update --yes --quiet && apt-get install --yes --quiet --no-install-r
6060
&& apt-get clean
6161

6262
# Install node (Keep the version in sync with the node container above)
63-
RUN mkdir -p /etc/apt/keyrings
64-
RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
65-
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
66-
RUN apt-get update
67-
RUN apt install nodejs -y
63+
RUN curl -fsSL https://deb.nodesource.com/setup_${NODE_MAJOR}.x | bash - && \
64+
apt-get install -y nodejs
6865

6966
# Use user "wagtail" to run the build commands below and the server itself.
7067
USER wagtail

0 commit comments

Comments
 (0)