1- FROM microsoft/windowsservercore as download
1+ FROM microsoft/nanoserver
22
33SHELL ["powershell" , "-Command" , "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';" ]
44
55ENV NODE_VERSION 6.14.2
66
77ENV GPG_VERSION 2.3.4
88
9- RUN [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12 ; \
10- Invoke-WebRequest $('https://files.gpg4win.org/gpg4win-vanilla-{0}.exe' -f $env:GPG_VERSION) -OutFile 'gpg4win.exe' -UseBasicParsing ; \
9+ RUN Invoke-WebRequest $('https://files.gpg4win.org/gpg4win-vanilla-{0}.exe' -f $env:GPG_VERSION) -OutFile 'gpg4win.exe' -SslProtocol 'Tls12' -UseBasicParsing ; \
1110 Start-Process .\g pg4win.exe -ArgumentList '/S' -NoNewWindow -Wait ;
1211
1312RUN @( \
@@ -23,7 +22,7 @@ RUN @( \
2322 ) | foreach { \
2423 gpg --keyserver ha.pool.sks-keyservers.net --recv-keys $_ ; \
2524 } ; \
26- [System. Net.ServicePointManager]::SecurityProtocol = [System. Net.SecurityProtocolType]::Tls12 ; \
25+ [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 ; \
2726 Invoke-WebRequest $('https://nodejs.org/dist/v{0}/SHASUMS256.txt.asc' -f $env:NODE_VERSION) -OutFile 'SHASUMS256.txt.asc' -UseBasicParsing ; \
2827 gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc ; \
2928 Invoke-WebRequest $('https://nodejs.org/dist/v{0}/node-v{0}-win-x64.zip' -f $env:NODE_VERSION) -OutFile 'node.zip' -UseBasicParsing ; \
@@ -32,9 +31,9 @@ RUN @( \
3231 Expand-Archive node.zip -DestinationPath C:\ ; \
3332 Rename-Item -Path $('C:\n ode-v{0}-win-x64' -f $env:NODE_VERSION) -NewName 'C:\n odejs'
3433
35- ENV YARN_VERSION 1.6 .0
34+ ENV YARN_VERSION 1.7 .0
3635
37- RUN [System. Net.ServicePointManager]::SecurityProtocol = [System. Net.SecurityProtocolType]::Tls12 ; \
36+ RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 ; \
3837 Invoke-WebRequest $('https://yarnpkg.com/downloads/{0}/yarn-{0}.msi' -f $env:YARN_VERSION) -OutFile yarn.msi -UseBasicParsing ; \
3938 $sig = Get-AuthenticodeSignature -filepath yarn.msi ; \
4039 if ($sig.Status -ne 'Valid' ) { Write-Error 'Authenticode signature is not valid' } ; \
@@ -43,16 +42,6 @@ RUN [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityPro
4342 ) -notcontains $sig.SignerCertificate.Thumbprint) { Write-Error 'Unknown signer certificate' } ; \
4443 Start-Process msiexec.exe -ArgumentList '/i' , 'yarn.msi' , '/quiet' , '/norestart' -NoNewWindow -Wait
4544
46- FROM microsoft/nanoserver
47-
48- SHELL ["powershell" , "-Command" , "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';" ]
49-
50- ENV NODE_VERSION 6.14.2
51- ENV YARN_VERSION 1.6.0
52-
53- COPY --from=download /nodejs /nodejs
54- COPY --from=download [ "/Program Files (x86)/yarn" , "/yarn" ]
55-
5645RUN New-Item $($env:APPDATA + '\n pm' ) -Type Directory ; \
5746 $env:PATH = 'C:\n odejs;{0}\n pm;C:\y arn\b in;{1}' -f $env:APPDATA, $env:PATH ; \
5847 Set-ItemProperty -Path 'HKLM:\S YSTEM\C urrentControlSet\C ontrol\S ession Manager\E nvironment\' -Name Path -Value $env:PATH
0 commit comments