Skip to content

Commit

Permalink
fix: nodejs install
Browse files Browse the repository at this point in the history
  • Loading branch information
micdes-pagopa committed Mar 29, 2024
1 parent 3b5b62c commit 8306367
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,13 @@ RUN curl -O https://downloads.mongodb.com/compass/mongodb-mongosh_1.6.1_amd64.de
RUN apt-get install -y ./mongodb-mongosh_1.6.1_amd64.deb
RUN rm ./mongodb-mongosh_1.6.1_amd64.deb

# install NVM (Node Version Manager) and NodeJS
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
RUN nvm install 18
# install NodeJS 18-x
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_18.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
RUN apt-get update
RUN apt-get install nodejs -y
RUN node -v

RUN useradd github && \
mkdir -p /home/github && \
Expand All @@ -95,4 +99,5 @@ COPY entrypoint.sh ./entrypoint.sh
RUN chmod +x ./entrypoint.sh

USER github

ENTRYPOINT ["/home/github/entrypoint.sh"]

0 comments on commit 8306367

Please sign in to comment.