Skip to content

Instantly share code, notes, and snippets.

@AlbertoDePena
Created December 16, 2019 21:31
Show Gist options
  • Save AlbertoDePena/846291bbe779da5dfd7dbee7f3a1065d to your computer and use it in GitHub Desktop.
Save AlbertoDePena/846291bbe779da5dfd7dbee7f3a1065d to your computer and use it in GitHub Desktop.
FROM mcr.microsoft.com/windows/servercore:1809 as installer
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
COPY node-v12.13.1-win-x64.zip .
RUN Expand-Archive C:\node-v12.13.1-win-x64.zip -DestinationPath C:\; \
Rename-Item C:\node-v12.13.1-win-x64 C:\nodejs
FROM mcr.microsoft.com/windows/nanoserver:1809
WORKDIR C:\\nodejs
COPY --from=installer C:\\nodejs\ .
ENV PATH="$WindowsPATH;C:\nodejs"
ENV NODE_VERSION 12.13.1
RUN npm config set registry https://registry.npmjs.org/
CMD [ "node.exe" ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment