Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Create Dockerfile
Added Docker Node support for Windows natively -> 6.9.2
  • Loading branch information
computeronix authored Dec 27, 2016
commit a890ef4dba11e47113f4dc38572baeef1aa5156a
34 changes: 34 additions & 0 deletions 6.9/windows/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
FROM microsoft/windowsservercore

SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';"]

ENV NPM_CONFIG_LOGLEVEL info
ENV NODE_VERSION 6.9.2

RUN $url = ('https://nodejs.org/dist/v{0}/node-v{0}-x64.msi' -f $env:NODE_VERSION); \
Write-Host ('Downloading {0} ...' -f $url); \
(New-Object System.Net.WebClient).DownloadFile($url, 'node.msi'); \

This comment was marked as off-topic.

\
Write-Host 'Installing ...'; \
Start-Process msiexec.exe -Wait \
-ArgumentList @( \
'/i', \
'node.msi', \
'/quiet', \
'ALLUSERS=1', \
'/passive', \
'/norestart' \
); \
\
# the installer updated PATH, so we should refresh our local value
$env:PATH = [Environment]::GetEnvironmentVariable('PATH', [EnvironmentVariableTarget]::Machine); \
\
Write-Host 'Verifying install ...'; \
Write-Host ' node --version'; node --version; \
\
Write-Host 'Removing ...'; \
Remove-Item node.msi -Force; \
\
Write-Host 'Complete.';

CMD ["node"]