This image includes node version v8.1.3 and npm version 5.0.4 with latest microsoft/nanoserver .
888
If you build your own image using this docker file, you will always get the latest nanoserver, nodejs and npm. Please comment if you need any explanation or improvements.
FROM microsoft/nanoserver:latest
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
ADD https://nodejs.org/dist/latest/win-x64/node.exe /nodejs/node.exe
ADD https://raw.githubusercontent.com/nodejs/node/master/tools/msvs/nodevars.bat /nodejs/nodevars.bat
ADD https://github.com/npm/npm/archive/latest.zip /TEMP/npm_latest.zip
RUN Expand-Archive -Path "C:\TEMP\npm_latest.zip" -DestinationPath "C:\TEMP\."
RUN mkdir "C:\nodejs\node_modules"; \
move "C:\TEMP\npm-latest" -Destination "C:\nodejs\node_modules\."; \
ren -Path "C:\nodejs\node_modules\npm-latest" -NewName "C:\nodejs\node_modules\npm"; \
copy "C:\nodejs\node_modules\npm\bin\npm" "C:\nodejs\."; \
copy "C:\nodejs\node_modules\npm\bin\npm.cmd" "C:\nodejs\.";
RUN setx /M PATH $($Env:PATH + ';' + 'C:\nodejs')
ENTRYPOINT ["node"]
Content type
Image
Digest
Size
353.3 MB
Last updated
over 9 years ago
docker pull cswords/nodejs