Skip to content

Instantly share code, notes, and snippets.

@Andersoft
Last active June 2, 2022 17:38
Show Gist options
  • Save Andersoft/d23dbde898dd0d26003149c450096e6f to your computer and use it in GitHub Desktop.
Save Andersoft/d23dbde898dd0d26003149c450096e6f to your computer and use it in GitHub Desktop.
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS base
WORKDIR /src
ENV NODE_VERSION 18.2.0
ENV NODE_DOWNLOAD_SHA 73d3f98e96e098587c2154dcaa82a6469a510e89a4881663dc4c86985acf245e
ENV NODE_DOWNLOAD_URL https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.gz
RUN wget "$NODE_DOWNLOAD_URL" -O nodejs.tar.gz \
&& echo "$NODE_DOWNLOAD_SHA nodejs.tar.gz" | sha256sum -c - \
&& tar -xzf "nodejs.tar.gz" -C /usr/local --strip-components=1 \
&& rm nodejs.tar.gz \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs \
&& curl -sL https://deb.nodesource.com/setup_16.x | bash - \
&& apt update \
&& apt-get install -y nodejs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment