Skip to content

Commit 07e8a04

Browse files
committed
fix docker nodejs install
1 parent 3faa10f commit 07e8a04

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

docs/Dockerfile

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
11
FROM python:3.9
2-
32
WORKDIR /app/
43

4+
RUN apt-get update
5+
RUN apt-get install -y ca-certificates curl gnupg
6+
57
# Install NodeJS
68
# --------------
7-
RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash -
8-
RUN apt-get install -y build-essential nodejs npm
9-
RUN npm install -g [email protected]
9+
# Download and import the Nodesource GPG key
10+
RUN mkdir -p /etc/apt/keyrings
11+
RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
12+
#Create deb repository
13+
RUN NODE_MAJOR=20
14+
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
15+
# Run Update and Install
16+
RUN apt-get update
17+
RUN apt-get install nodejs -y
1018

1119
# Install Poetry
1220
# --------------

0 commit comments

Comments
 (0)