Skip to content

Commit 5be2c47

Browse files
StefanSchererLaurentGoderre
authored andcommitted
Introduce Windows Docker images
1 parent 40511bf commit 5be2c47

File tree

16 files changed

+663
-3
lines changed

16 files changed

+663
-3
lines changed

10/windows/nanoserver/Dockerfile

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
FROM microsoft/windowsservercore as download
2+
3+
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
4+
5+
ENV GPG_VERSION 2.3.4
6+
7+
RUN Invoke-WebRequest $('https://files.gpg4win.org/gpg4win-vanilla-{0}.exe' -f $env:GPG_VERSION) -OutFile 'gpg4win.exe' -UseBasicParsing ; \
8+
Start-Process .\gpg4win.exe -ArgumentList '/S' -NoNewWindow -Wait
9+
10+
RUN @( \
11+
'9554F04D7259F04124DE6B476D5A82AC7E37093B', \
12+
'94AE36675C464D64BAFA68DD7434390BDBE9B9C5', \
13+
'FD3A5288F042B6850C66B31F09FE44734EB7990E', \
14+
'71DCFD284A79C3B38668286BC97EC7A07EDE3FC1', \
15+
'DD8F2338BAE7501E3DD5AC78C273792F7D83545D', \
16+
'B9AE9905FFD7803F25714661B63B535A4C206CA9', \
17+
'C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8', \
18+
'56730D5401028683275BD23C23EFEFE93C4CFFFE' \
19+
) | foreach { \
20+
gpg --keyserver ha.pool.sks-keyservers.net --recv-keys $_ ; \
21+
}
22+
23+
ENV NODE_VERSION 10.0.0
24+
25+
RUN Invoke-WebRequest $('https://nodejs.org/dist/v{0}/SHASUMS256.txt.asc' -f $env:NODE_VERSION) -OutFile 'SHASUMS256.txt.asc' -UseBasicParsing ; \
26+
gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc
27+
28+
RUN Invoke-WebRequest $('https://nodejs.org/dist/v{0}/node-v{0}-win-x64.zip' -f $env:NODE_VERSION) -OutFile 'node.zip' -UseBasicParsing ; \
29+
$sum = $(cat SHASUMS256.txt.asc | sls $(' node-v{0}-win-x64.zip' -f $env:NODE_VERSION)) -Split ' ' ; \
30+
if ((Get-FileHash node.zip -Algorithm sha256).Hash -ne $sum[0]) { Write-Error 'SHA256 mismatch' } ; \
31+
Expand-Archive node.zip -DestinationPath C:\ ; \
32+
Rename-Item -Path $('C:\node-v{0}-win-x64' -f $env:NODE_VERSION) -NewName 'C:\nodejs'
33+
34+
ENV YARN_VERSION 1.6.0
35+
36+
RUN Invoke-WebRequest $('https://yarnpkg.com/downloads/{0}/yarn-{0}.msi' -f $env:YARN_VERSION) -OutFile yarn.msi -UseBasicParsing ; \
37+
$sig = Get-AuthenticodeSignature yarn.msi ; \
38+
if ($sig.Status -ne 'Valid') { Write-Error 'Authenticode signature is not valid' } ; \
39+
if (@( \
40+
'7E253367F8A102A91D04829E37F3410F14B68A5F' \
41+
) -notcontains $sig.SignerCertificate.Thumbprint) { Write-Error 'Unknown signer certificate' } ; \
42+
Start-Process msiexec.exe -ArgumentList '/i', 'yarn.msi', '/quiet', '/norestart' -NoNewWindow -Wait
43+
44+
FROM microsoft/nanoserver
45+
46+
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
47+
48+
ENV NPM_CONFIG_LOGLEVEL info
49+
50+
COPY --from=download /nodejs /nodejs
51+
COPY --from=download [ "/Program Files (x86)/yarn", "/yarn" ]
52+
53+
RUN New-Item $($env:APPDATA + '\npm') -Type Directory ; \
54+
$env:PATH = 'C:\nodejs;{0}\npm;C:\yarn\bin;{1}' -f $env:APPDATA, $env:PATH ; \
55+
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\' -Name Path -Value $env:PATH
56+
57+
CMD [ "node.exe" ]
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
FROM microsoft/windowsservercore as download
2+
3+
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
4+
5+
ENV GPG_VERSION 2.3.4
6+
7+
RUN Invoke-WebRequest $('https://files.gpg4win.org/gpg4win-vanilla-{0}.exe' -f $env:GPG_VERSION) -OutFile 'gpg4win.exe' -UseBasicParsing ; \
8+
Start-Process .\gpg4win.exe -ArgumentList '/S' -NoNewWindow -Wait
9+
10+
RUN @( \
11+
'9554F04D7259F04124DE6B476D5A82AC7E37093B', \
12+
'94AE36675C464D64BAFA68DD7434390BDBE9B9C5', \
13+
'FD3A5288F042B6850C66B31F09FE44734EB7990E', \
14+
'71DCFD284A79C3B38668286BC97EC7A07EDE3FC1', \
15+
'DD8F2338BAE7501E3DD5AC78C273792F7D83545D', \
16+
'B9AE9905FFD7803F25714661B63B535A4C206CA9', \
17+
'C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8', \
18+
'56730D5401028683275BD23C23EFEFE93C4CFFFE' \
19+
) | foreach { \
20+
gpg --keyserver ha.pool.sks-keyservers.net --recv-keys $_ ; \
21+
}
22+
23+
ENV NODE_VERSION 10.0.0
24+
25+
RUN Invoke-WebRequest $('https://nodejs.org/dist/v{0}/SHASUMS256.txt.asc' -f $env:NODE_VERSION) -OutFile 'SHASUMS256.txt.asc' -UseBasicParsing ; \
26+
gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc
27+
28+
RUN Invoke-WebRequest $('https://nodejs.org/dist/v{0}/node-v{0}-win-x64.zip' -f $env:NODE_VERSION) -OutFile 'node.zip' -UseBasicParsing ; \
29+
$sum = $(cat SHASUMS256.txt.asc | sls $(' node-v{0}-win-x64.zip' -f $env:NODE_VERSION)) -Split ' ' ; \
30+
if ((Get-FileHash node.zip -Algorithm sha256).Hash -ne $sum[0]) { Write-Error 'SHA256 mismatch' } ; \
31+
Expand-Archive node.zip -DestinationPath C:\ ; \
32+
Rename-Item -Path $('C:\node-v{0}-win-x64' -f $env:NODE_VERSION) -NewName 'C:\nodejs'
33+
34+
ENV YARN_VERSION 1.6.0
35+
36+
RUN Invoke-WebRequest $('https://yarnpkg.com/downloads/{0}/yarn-{0}.msi' -f $env:YARN_VERSION) -OutFile yarn.msi -UseBasicParsing ; \
37+
$sig = Get-AuthenticodeSignature yarn.msi ; \
38+
if ($sig.Status -ne 'Valid') { Write-Error 'Authenticode signature is not valid' } ; \
39+
if (@( \
40+
'7E253367F8A102A91D04829E37F3410F14B68A5F' \
41+
) -notcontains $sig.SignerCertificate.Thumbprint) { Write-Error 'Unknown signer certificate' } ; \
42+
Start-Process msiexec.exe -ArgumentList '/i', 'yarn.msi', '/quiet', '/norestart' -NoNewWindow -Wait
43+
44+
FROM microsoft/windowsservercore
45+
46+
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
47+
48+
ENV NPM_CONFIG_LOGLEVEL info
49+
50+
COPY --from=download /nodejs /nodejs
51+
COPY --from=download [ "/Program Files (x86)/yarn", "/yarn" ]
52+
53+
RUN New-Item $($env:APPDATA + '\npm') -Type Directory ; \
54+
$env:PATH = 'C:\nodejs;{0}\npm;C:\yarn\bin;{1}' -f $env:APPDATA, $env:PATH ; \
55+
[Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine)
56+
57+
CMD [ "node.exe" ]

6/windows/nanoserver/Dockerfile

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
FROM microsoft/windowsservercore as download
2+
3+
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
4+
5+
ENV GPG_VERSION 2.3.4
6+
7+
RUN Invoke-WebRequest $('https://files.gpg4win.org/gpg4win-vanilla-{0}.exe' -f $env:GPG_VERSION) -OutFile 'gpg4win.exe' -UseBasicParsing ; \
8+
Start-Process .\gpg4win.exe -ArgumentList '/S' -NoNewWindow -Wait
9+
10+
RUN @( \
11+
'9554F04D7259F04124DE6B476D5A82AC7E37093B', \
12+
'94AE36675C464D64BAFA68DD7434390BDBE9B9C5', \
13+
'FD3A5288F042B6850C66B31F09FE44734EB7990E', \
14+
'71DCFD284A79C3B38668286BC97EC7A07EDE3FC1', \
15+
'DD8F2338BAE7501E3DD5AC78C273792F7D83545D', \
16+
'B9AE9905FFD7803F25714661B63B535A4C206CA9', \
17+
'C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8', \
18+
'56730D5401028683275BD23C23EFEFE93C4CFFFE' \
19+
) | foreach { \
20+
gpg --keyserver ha.pool.sks-keyservers.net --recv-keys $_ ; \
21+
}
22+
23+
ENV NODE_VERSION 6.14.2
24+
25+
RUN Invoke-WebRequest $('https://nodejs.org/dist/v{0}/SHASUMS256.txt.asc' -f $env:NODE_VERSION) -OutFile 'SHASUMS256.txt.asc' -UseBasicParsing ; \
26+
gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc
27+
28+
RUN Invoke-WebRequest $('https://nodejs.org/dist/v{0}/node-v{0}-win-x64.zip' -f $env:NODE_VERSION) -OutFile 'node.zip' -UseBasicParsing ; \
29+
$sum = $(cat SHASUMS256.txt.asc | sls $(' node-v{0}-win-x64.zip' -f $env:NODE_VERSION)) -Split ' ' ; \
30+
if ((Get-FileHash node.zip -Algorithm sha256).Hash -ne $sum[0]) { Write-Error 'SHA256 mismatch' } ; \
31+
Expand-Archive node.zip -DestinationPath C:\ ; \
32+
Rename-Item -Path $('C:\node-v{0}-win-x64' -f $env:NODE_VERSION) -NewName 'C:\nodejs'
33+
34+
ENV YARN_VERSION 1.6.0
35+
36+
RUN Invoke-WebRequest $('https://yarnpkg.com/downloads/{0}/yarn-{0}.msi' -f $env:YARN_VERSION) -OutFile yarn.msi -UseBasicParsing ; \
37+
$sig = Get-AuthenticodeSignature yarn.msi ; \
38+
if ($sig.Status -ne 'Valid') { Write-Error 'Authenticode signature is not valid' } ; \
39+
if (@( \
40+
'7E253367F8A102A91D04829E37F3410F14B68A5F' \
41+
) -notcontains $sig.SignerCertificate.Thumbprint) { Write-Error 'Unknown signer certificate' } ; \
42+
Start-Process msiexec.exe -ArgumentList '/i', 'yarn.msi', '/quiet', '/norestart' -NoNewWindow -Wait
43+
44+
FROM microsoft/nanoserver
45+
46+
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
47+
48+
ENV NPM_CONFIG_LOGLEVEL info
49+
50+
COPY --from=download /nodejs /nodejs
51+
COPY --from=download [ "/Program Files (x86)/yarn", "/yarn" ]
52+
53+
RUN New-Item $($env:APPDATA + '\npm') -Type Directory ; \
54+
$env:PATH = 'C:\nodejs;{0}\npm;C:\yarn\bin;{1}' -f $env:APPDATA, $env:PATH ; \
55+
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\' -Name Path -Value $env:PATH
56+
57+
CMD [ "node.exe" ]
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
FROM microsoft/windowsservercore as download
2+
3+
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
4+
5+
ENV GPG_VERSION 2.3.4
6+
7+
RUN Invoke-WebRequest $('https://files.gpg4win.org/gpg4win-vanilla-{0}.exe' -f $env:GPG_VERSION) -OutFile 'gpg4win.exe' -UseBasicParsing ; \
8+
Start-Process .\gpg4win.exe -ArgumentList '/S' -NoNewWindow -Wait
9+
10+
RUN @( \
11+
'9554F04D7259F04124DE6B476D5A82AC7E37093B', \
12+
'94AE36675C464D64BAFA68DD7434390BDBE9B9C5', \
13+
'FD3A5288F042B6850C66B31F09FE44734EB7990E', \
14+
'71DCFD284A79C3B38668286BC97EC7A07EDE3FC1', \
15+
'DD8F2338BAE7501E3DD5AC78C273792F7D83545D', \
16+
'B9AE9905FFD7803F25714661B63B535A4C206CA9', \
17+
'C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8', \
18+
'56730D5401028683275BD23C23EFEFE93C4CFFFE' \
19+
) | foreach { \
20+
gpg --keyserver ha.pool.sks-keyservers.net --recv-keys $_ ; \
21+
}
22+
23+
ENV NODE_VERSION 6.14.2
24+
25+
RUN Invoke-WebRequest $('https://nodejs.org/dist/v{0}/SHASUMS256.txt.asc' -f $env:NODE_VERSION) -OutFile 'SHASUMS256.txt.asc' -UseBasicParsing ; \
26+
gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc
27+
28+
RUN Invoke-WebRequest $('https://nodejs.org/dist/v{0}/node-v{0}-win-x64.zip' -f $env:NODE_VERSION) -OutFile 'node.zip' -UseBasicParsing ; \
29+
$sum = $(cat SHASUMS256.txt.asc | sls $(' node-v{0}-win-x64.zip' -f $env:NODE_VERSION)) -Split ' ' ; \
30+
if ((Get-FileHash node.zip -Algorithm sha256).Hash -ne $sum[0]) { Write-Error 'SHA256 mismatch' } ; \
31+
Expand-Archive node.zip -DestinationPath C:\ ; \
32+
Rename-Item -Path $('C:\node-v{0}-win-x64' -f $env:NODE_VERSION) -NewName 'C:\nodejs'
33+
34+
ENV YARN_VERSION 1.6.0
35+
36+
RUN Invoke-WebRequest $('https://yarnpkg.com/downloads/{0}/yarn-{0}.msi' -f $env:YARN_VERSION) -OutFile yarn.msi -UseBasicParsing ; \
37+
$sig = Get-AuthenticodeSignature yarn.msi ; \
38+
if ($sig.Status -ne 'Valid') { Write-Error 'Authenticode signature is not valid' } ; \
39+
if (@( \
40+
'7E253367F8A102A91D04829E37F3410F14B68A5F' \
41+
) -notcontains $sig.SignerCertificate.Thumbprint) { Write-Error 'Unknown signer certificate' } ; \
42+
Start-Process msiexec.exe -ArgumentList '/i', 'yarn.msi', '/quiet', '/norestart' -NoNewWindow -Wait
43+
44+
FROM microsoft/windowsservercore
45+
46+
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
47+
48+
ENV NPM_CONFIG_LOGLEVEL info
49+
50+
COPY --from=download /nodejs /nodejs
51+
COPY --from=download [ "/Program Files (x86)/yarn", "/yarn" ]
52+
53+
RUN New-Item $($env:APPDATA + '\npm') -Type Directory ; \
54+
$env:PATH = 'C:\nodejs;{0}\npm;C:\yarn\bin;{1}' -f $env:APPDATA, $env:PATH ; \
55+
[Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine)
56+
57+
CMD [ "node.exe" ]

8/windows/nanoserver/Dockerfile

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
FROM microsoft/windowsservercore as download
2+
3+
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
4+
5+
ENV GPG_VERSION 2.3.4
6+
7+
RUN Invoke-WebRequest $('https://files.gpg4win.org/gpg4win-vanilla-{0}.exe' -f $env:GPG_VERSION) -OutFile 'gpg4win.exe' -UseBasicParsing ; \
8+
Start-Process .\gpg4win.exe -ArgumentList '/S' -NoNewWindow -Wait
9+
10+
RUN @( \
11+
'9554F04D7259F04124DE6B476D5A82AC7E37093B', \
12+
'94AE36675C464D64BAFA68DD7434390BDBE9B9C5', \
13+
'FD3A5288F042B6850C66B31F09FE44734EB7990E', \
14+
'71DCFD284A79C3B38668286BC97EC7A07EDE3FC1', \
15+
'DD8F2338BAE7501E3DD5AC78C273792F7D83545D', \
16+
'B9AE9905FFD7803F25714661B63B535A4C206CA9', \
17+
'C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8', \
18+
'56730D5401028683275BD23C23EFEFE93C4CFFFE' \
19+
) | foreach { \
20+
gpg --keyserver ha.pool.sks-keyservers.net --recv-keys $_ ; \
21+
}
22+
23+
ENV NODE_VERSION 8.11.1
24+
25+
RUN Invoke-WebRequest $('https://nodejs.org/dist/v{0}/SHASUMS256.txt.asc' -f $env:NODE_VERSION) -OutFile 'SHASUMS256.txt.asc' -UseBasicParsing ; \
26+
gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc
27+
28+
RUN Invoke-WebRequest $('https://nodejs.org/dist/v{0}/node-v{0}-win-x64.zip' -f $env:NODE_VERSION) -OutFile 'node.zip' -UseBasicParsing ; \
29+
$sum = $(cat SHASUMS256.txt.asc | sls $(' node-v{0}-win-x64.zip' -f $env:NODE_VERSION)) -Split ' ' ; \
30+
if ((Get-FileHash node.zip -Algorithm sha256).Hash -ne $sum[0]) { Write-Error 'SHA256 mismatch' } ; \
31+
Expand-Archive node.zip -DestinationPath C:\ ; \
32+
Rename-Item -Path $('C:\node-v{0}-win-x64' -f $env:NODE_VERSION) -NewName 'C:\nodejs'
33+
34+
ENV YARN_VERSION 1.5.1
35+
36+
RUN Invoke-WebRequest $('https://yarnpkg.com/downloads/{0}/yarn-{0}.msi' -f $env:YARN_VERSION) -OutFile yarn.msi -UseBasicParsing ; \
37+
$sig = Get-AuthenticodeSignature yarn.msi ; \
38+
if ($sig.Status -ne 'Valid') { Write-Error 'Authenticode signature is not valid' } ; \
39+
if (@( \
40+
'7E253367F8A102A91D04829E37F3410F14B68A5F' \
41+
) -notcontains $sig.SignerCertificate.Thumbprint) { Write-Error 'Unknown signer certificate' } ; \
42+
Start-Process msiexec.exe -ArgumentList '/i', 'yarn.msi', '/quiet', '/norestart' -NoNewWindow -Wait
43+
44+
FROM microsoft/nanoserver
45+
46+
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
47+
48+
ENV NPM_CONFIG_LOGLEVEL info
49+
50+
COPY --from=download /nodejs /nodejs
51+
COPY --from=download [ "/Program Files (x86)/yarn", "/yarn" ]
52+
53+
RUN New-Item $($env:APPDATA + '\npm') -Type Directory ; \
54+
$env:PATH = 'C:\nodejs;{0}\npm;C:\yarn\bin;{1}' -f $env:APPDATA, $env:PATH ; \
55+
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\' -Name Path -Value $env:PATH
56+
57+
CMD [ "node.exe" ]
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
FROM microsoft/windowsservercore as download
2+
3+
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
4+
5+
ENV GPG_VERSION 2.3.4
6+
7+
RUN Invoke-WebRequest $('https://files.gpg4win.org/gpg4win-vanilla-{0}.exe' -f $env:GPG_VERSION) -OutFile 'gpg4win.exe' -UseBasicParsing ; \
8+
Start-Process .\gpg4win.exe -ArgumentList '/S' -NoNewWindow -Wait
9+
10+
RUN @( \
11+
'9554F04D7259F04124DE6B476D5A82AC7E37093B', \
12+
'94AE36675C464D64BAFA68DD7434390BDBE9B9C5', \
13+
'FD3A5288F042B6850C66B31F09FE44734EB7990E', \
14+
'71DCFD284A79C3B38668286BC97EC7A07EDE3FC1', \
15+
'DD8F2338BAE7501E3DD5AC78C273792F7D83545D', \
16+
'B9AE9905FFD7803F25714661B63B535A4C206CA9', \
17+
'C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8', \
18+
'56730D5401028683275BD23C23EFEFE93C4CFFFE' \
19+
) | foreach { \
20+
gpg --keyserver ha.pool.sks-keyservers.net --recv-keys $_ ; \
21+
}
22+
23+
ENV NODE_VERSION 8.11.1
24+
25+
RUN Invoke-WebRequest $('https://nodejs.org/dist/v{0}/SHASUMS256.txt.asc' -f $env:NODE_VERSION) -OutFile 'SHASUMS256.txt.asc' -UseBasicParsing ; \
26+
gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc
27+
28+
RUN Invoke-WebRequest $('https://nodejs.org/dist/v{0}/node-v{0}-win-x64.zip' -f $env:NODE_VERSION) -OutFile 'node.zip' -UseBasicParsing ; \
29+
$sum = $(cat SHASUMS256.txt.asc | sls $(' node-v{0}-win-x64.zip' -f $env:NODE_VERSION)) -Split ' ' ; \
30+
if ((Get-FileHash node.zip -Algorithm sha256).Hash -ne $sum[0]) { Write-Error 'SHA256 mismatch' } ; \
31+
Expand-Archive node.zip -DestinationPath C:\ ; \
32+
Rename-Item -Path $('C:\node-v{0}-win-x64' -f $env:NODE_VERSION) -NewName 'C:\nodejs'
33+
34+
ENV YARN_VERSION 1.5.1
35+
36+
RUN Invoke-WebRequest $('https://yarnpkg.com/downloads/{0}/yarn-{0}.msi' -f $env:YARN_VERSION) -OutFile yarn.msi -UseBasicParsing ; \
37+
$sig = Get-AuthenticodeSignature yarn.msi ; \
38+
if ($sig.Status -ne 'Valid') { Write-Error 'Authenticode signature is not valid' } ; \
39+
if (@( \
40+
'7E253367F8A102A91D04829E37F3410F14B68A5F' \
41+
) -notcontains $sig.SignerCertificate.Thumbprint) { Write-Error 'Unknown signer certificate' } ; \
42+
Start-Process msiexec.exe -ArgumentList '/i', 'yarn.msi', '/quiet', '/norestart' -NoNewWindow -Wait
43+
44+
FROM microsoft/windowsservercore
45+
46+
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
47+
48+
ENV NPM_CONFIG_LOGLEVEL info
49+
50+
COPY --from=download /nodejs /nodejs
51+
COPY --from=download [ "/Program Files (x86)/yarn", "/yarn" ]
52+
53+
RUN New-Item $($env:APPDATA + '\npm') -Type Directory ; \
54+
$env:PATH = 'C:\nodejs;{0}\npm;C:\yarn\bin;{1}' -f $env:APPDATA, $env:PATH ; \
55+
[Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine)
56+
57+
CMD [ "node.exe" ]

0 commit comments

Comments
 (0)