Skip to content

Commit b690845

Browse files
committed
Cleanup Dockerfile
1 parent 0916d53 commit b690845

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

node/7.8/Dockerfile

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,7 @@ RUN Invoke-WebRequest $('https://nodejs.org/dist/v{0}/node-v{0}-win-x64.zip' -f
2929
$sum = $(cat SHASUMS256.txt.asc | sls $(' node-v{0}-win-x64.zip' -f $env:NODE_VERSION)) -Split ' ' ; \
3030
if ((Get-FileHash node.zip -Algorithm sha256).Hash -ne $sum[0]) { Write-Error 'SHA256 mismatch' } ; \
3131
Expand-Archive node.zip -DestinationPath C:\ ; \
32-
Rename-Item -Path $('C:\node-v{0}-win-x64' -f $env:NODE_VERSION) -NewName 'C:\nodejs' ; \
33-
New-Item $($env:APPDATA + '\npm') ; \
34-
$env:PATH = 'C:\nodejs;{0}\npm;{1}' -f $env:APPDATA, $env:PATH ; \
35-
[Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine) ; \
36-
Remove-Item -Path node.zip
32+
Rename-Item -Path $('C:\node-v{0}-win-x64' -f $env:NODE_VERSION) -NewName 'C:\nodejs'
3733

3834
FROM microsoft/windowsservercore
3935

@@ -45,6 +41,6 @@ COPY --from=0 /nodejs /nodejs
4541

4642
RUN New-Item $($env:APPDATA + '\npm') ; \
4743
$env:PATH = 'C:\nodejs;{0}\npm;{1}' -f $env:APPDATA, $env:PATH ; \
48-
[Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine) ; \
44+
[Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine)
4945

5046
CMD [ "node.exe" ]

0 commit comments

Comments
 (0)