1
- FROM microsoft/windowsservercore as download
1
+ FROM microsoft/nanoserver
2
2
3
3
SHELL ["powershell" , "-Command" , "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';" ]
4
4
5
5
ENV NODE_VERSION 6.14.2
6
6
7
7
ENV GPG_VERSION 2.3.4
8
8
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' -UseBasicParsing ; \
11
10
Start-Process .\g pg4win.exe -ArgumentList '/S' -NoNewWindow -Wait ;
12
11
13
12
RUN @( \
@@ -23,7 +22,7 @@ RUN @( \
23
22
) | foreach { \
24
23
gpg --keyserver ha.pool.sks-keyservers.net --recv-keys $_ ; \
25
24
} ; \
26
- [System. Net.ServicePointManager]::SecurityProtocol = [System. Net.SecurityProtocolType]::Tls12 ; \
25
+ [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 ; \
27
26
Invoke-WebRequest $('https://nodejs.org/dist/v{0}/SHASUMS256.txt.asc' -f $env:NODE_VERSION) -OutFile 'SHASUMS256.txt.asc' -UseBasicParsing ; \
28
27
gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc ; \
29
28
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 @( \
32
31
Expand-Archive node.zip -DestinationPath C:\ ; \
33
32
Rename-Item -Path $('C:\n ode-v{0}-win-x64' -f $env:NODE_VERSION) -NewName 'C:\n odejs'
34
33
35
- ENV YARN_VERSION 1.6 .0
34
+ ENV YARN_VERSION 1.7 .0
36
35
37
- RUN [System. Net.ServicePointManager]::SecurityProtocol = [System. Net.SecurityProtocolType]::Tls12 ; \
36
+ RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 ; \
38
37
Invoke-WebRequest $('https://yarnpkg.com/downloads/{0}/yarn-{0}.msi' -f $env:YARN_VERSION) -OutFile yarn.msi -UseBasicParsing ; \
39
38
$sig = Get-AuthenticodeSignature -filepath yarn.msi ; \
40
39
if ($sig.Status -ne 'Valid' ) { Write-Error 'Authenticode signature is not valid' } ; \
@@ -43,16 +42,6 @@ RUN [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityPro
43
42
) -notcontains $sig.SignerCertificate.Thumbprint) { Write-Error 'Unknown signer certificate' } ; \
44
43
Start-Process msiexec.exe -ArgumentList '/i' , 'yarn.msi' , '/quiet' , '/norestart' -NoNewWindow -Wait
45
44
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
-
56
45
RUN New-Item $($env:APPDATA + '\n pm' ) -Type Directory ; \
57
46
$env:PATH = 'C:\n odejs;{0}\n pm;C:\y arn\b in;{1}' -f $env:APPDATA, $env:PATH ; \
58
47
Set-ItemProperty -Path 'HKLM:\S YSTEM\C urrentControlSet\C ontrol\S ession Manager\E nvironment\' -Name Path -Value $env:PATH
0 commit comments