Skip to content

Commit

Permalink
fix: use latest NodeSource installation script
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
engineervix committed Feb 10, 2024
1 parent 923acdb commit 5ddfaf7
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions {{cookiecutter.project_slug}}/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,8 @@ RUN apt-get update --yes --quiet && apt-get install --yes --quiet --no-install-r
&& apt-get clean

# Install node (Keep the version in sync with the node container above)
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 install nodejs -y
RUN curl -fsSL https://deb.nodesource.com/setup_${NODE_MAJOR}.x | bash - && \
apt-get install -y nodejs

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

0 comments on commit 5ddfaf7

Please sign in to comment.