Skip to content

Commit

Permalink
Migrate Node.js installation from unsupported setup script
Browse files Browse the repository at this point in the history
  • Loading branch information
domi-b committed Nov 1, 2023
1 parent 8afeb9e commit 12b51a7
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,15 @@ ARG REVISION
SHELL ["/bin/bash", "-c"]

# Install Node.js
RUN curl -sL https://deb.nodesource.com/setup_18.x | bash -
RUN apt-get install -y nodejs
RUN apt-get update && \
apt-get install -y ca-certificates curl gnupg && \
mkdir -p /etc/apt/keyrings && \
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
NODE_MAJOR=20 && \
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 && \
apt-get update && \
apt-get install nodejs -y && \
rm -rf /var/lib/apt/lists/*

# Restore dependencies and tools
COPY ["src/ILICheck.Web/ILICheck.Web.csproj", "ILICheck.Web/"]
Expand Down

0 comments on commit 12b51a7

Please sign in to comment.