diff --git a/10/windows/nanoserver/Dockerfile b/10/windows/nanoserver/Dockerfile index 9ead2b562..e448c9e8c 100644 --- a/10/windows/nanoserver/Dockerfile +++ b/10/windows/nanoserver/Dockerfile @@ -1,4 +1,4 @@ -FROM microsoft/windowsservercore as download +FROM microsoft/nanoserver SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] @@ -6,8 +6,7 @@ ENV NODE_VERSION 10.4.0 ENV GPG_VERSION 2.3.4 -RUN [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12 ; \ - Invoke-WebRequest $('https://files.gpg4win.org/gpg4win-vanilla-{0}.exe' -f $env:GPG_VERSION) -OutFile 'gpg4win.exe' -UseBasicParsing ; \ +RUN Invoke-WebRequest $('https://files.gpg4win.org/gpg4win-vanilla-{0}.exe' -f $env:GPG_VERSION) -OutFile 'gpg4win.exe' -UseBasicParsing ; \ Start-Process .\gpg4win.exe -ArgumentList '/S' -NoNewWindow -Wait ; RUN @( \ @@ -23,7 +22,7 @@ RUN @( \ ) | foreach { \ gpg --keyserver ha.pool.sks-keyservers.net --recv-keys $_ ; \ } ; \ - [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12 ; \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 ; \ Invoke-WebRequest $('https://nodejs.org/dist/v{0}/SHASUMS256.txt.asc' -f $env:NODE_VERSION) -OutFile 'SHASUMS256.txt.asc' -UseBasicParsing ; \ gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc ; \ Invoke-WebRequest $('https://nodejs.org/dist/v{0}/node-v{0}-win-x64.zip' -f $env:NODE_VERSION) -OutFile 'node.zip' -UseBasicParsing ; \ @@ -34,7 +33,7 @@ RUN @( \ ENV YARN_VERSION 1.7.0 -RUN [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12 ; \ +RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 ; \ Invoke-WebRequest $('https://yarnpkg.com/downloads/{0}/yarn-{0}.msi' -f $env:YARN_VERSION) -OutFile yarn.msi -UseBasicParsing ; \ $sig = Get-AuthenticodeSignature -filepath yarn.msi ; \ if ($sig.Status -ne 'Valid') { Write-Error 'Authenticode signature is not valid' } ; \ @@ -43,16 +42,6 @@ RUN [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityPro ) -notcontains $sig.SignerCertificate.Thumbprint) { Write-Error 'Unknown signer certificate' } ; \ Start-Process msiexec.exe -ArgumentList '/i', 'yarn.msi', '/quiet', '/norestart' -NoNewWindow -Wait -FROM microsoft/nanoserver - -SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] - -ENV NODE_VERSION 10.4.0 -ENV YARN_VERSION 1.7.0 - -COPY --from=download /nodejs /nodejs -COPY --from=download [ "/Program Files (x86)/yarn", "/yarn" ] - RUN New-Item $($env:APPDATA + '\npm') -Type Directory ; \ $env:PATH = 'C:\nodejs;{0}\npm;C:\yarn\bin;{1}' -f $env:APPDATA, $env:PATH ; \ Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\' -Name Path -Value $env:PATH diff --git a/10/windows/windowsservercore/Dockerfile b/10/windows/windowsservercore/Dockerfile index 7d2e70c06..681b64ed1 100644 --- a/10/windows/windowsservercore/Dockerfile +++ b/10/windows/windowsservercore/Dockerfile @@ -1,4 +1,4 @@ -FROM microsoft/windowsservercore as download +FROM microsoft/windowsservercore SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] @@ -43,16 +43,6 @@ RUN [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityPro ) -notcontains $sig.SignerCertificate.Thumbprint) { Write-Error 'Unknown signer certificate' } ; \ Start-Process msiexec.exe -ArgumentList '/i', 'yarn.msi', '/quiet', '/norestart' -NoNewWindow -Wait -FROM microsoft/windowsservercore - -SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] - -ENV NODE_VERSION 10.4.0 -ENV YARN_VERSION 1.7.0 - -COPY --from=download /nodejs /nodejs -COPY --from=download [ "/Program Files (x86)/yarn", "/yarn" ] - RUN New-Item $($env:APPDATA + '\npm') -Type Directory ; \ $env:PATH = 'C:\nodejs;{0}\npm;C:\yarn\bin;{1}' -f $env:APPDATA, $env:PATH ; \ [Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine) diff --git a/6/windows/nanoserver/Dockerfile b/6/windows/nanoserver/Dockerfile index c3226f6e4..7da77dc26 100644 --- a/6/windows/nanoserver/Dockerfile +++ b/6/windows/nanoserver/Dockerfile @@ -1,4 +1,4 @@ -FROM microsoft/windowsservercore as download +FROM microsoft/nanoserver SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] @@ -6,8 +6,7 @@ ENV NODE_VERSION 6.14.2 ENV GPG_VERSION 2.3.4 -RUN [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12 ; \ - Invoke-WebRequest $('https://files.gpg4win.org/gpg4win-vanilla-{0}.exe' -f $env:GPG_VERSION) -OutFile 'gpg4win.exe' -UseBasicParsing ; \ +RUN Invoke-WebRequest $('https://files.gpg4win.org/gpg4win-vanilla-{0}.exe' -f $env:GPG_VERSION) -OutFile 'gpg4win.exe' -UseBasicParsing ; \ Start-Process .\gpg4win.exe -ArgumentList '/S' -NoNewWindow -Wait ; RUN @( \ @@ -23,7 +22,7 @@ RUN @( \ ) | foreach { \ gpg --keyserver ha.pool.sks-keyservers.net --recv-keys $_ ; \ } ; \ - [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12 ; \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 ; \ Invoke-WebRequest $('https://nodejs.org/dist/v{0}/SHASUMS256.txt.asc' -f $env:NODE_VERSION) -OutFile 'SHASUMS256.txt.asc' -UseBasicParsing ; \ gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc ; \ 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 @( \ Expand-Archive node.zip -DestinationPath C:\ ; \ Rename-Item -Path $('C:\node-v{0}-win-x64' -f $env:NODE_VERSION) -NewName 'C:\nodejs' -ENV YARN_VERSION 1.6.0 +ENV YARN_VERSION 1.7.0 -RUN [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12 ; \ +RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 ; \ Invoke-WebRequest $('https://yarnpkg.com/downloads/{0}/yarn-{0}.msi' -f $env:YARN_VERSION) -OutFile yarn.msi -UseBasicParsing ; \ $sig = Get-AuthenticodeSignature -filepath yarn.msi ; \ if ($sig.Status -ne 'Valid') { Write-Error 'Authenticode signature is not valid' } ; \ @@ -43,16 +42,6 @@ RUN [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityPro ) -notcontains $sig.SignerCertificate.Thumbprint) { Write-Error 'Unknown signer certificate' } ; \ Start-Process msiexec.exe -ArgumentList '/i', 'yarn.msi', '/quiet', '/norestart' -NoNewWindow -Wait -FROM microsoft/nanoserver - -SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] - -ENV NODE_VERSION 6.14.2 -ENV YARN_VERSION 1.6.0 - -COPY --from=download /nodejs /nodejs -COPY --from=download [ "/Program Files (x86)/yarn", "/yarn" ] - RUN New-Item $($env:APPDATA + '\npm') -Type Directory ; \ $env:PATH = 'C:\nodejs;{0}\npm;C:\yarn\bin;{1}' -f $env:APPDATA, $env:PATH ; \ Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\' -Name Path -Value $env:PATH diff --git a/6/windows/windowsservercore/Dockerfile b/6/windows/windowsservercore/Dockerfile index fd155952d..ad23e7ad3 100644 --- a/6/windows/windowsservercore/Dockerfile +++ b/6/windows/windowsservercore/Dockerfile @@ -1,4 +1,4 @@ -FROM microsoft/windowsservercore as download +FROM microsoft/windowsservercore SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] @@ -43,16 +43,6 @@ RUN [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityPro ) -notcontains $sig.SignerCertificate.Thumbprint) { Write-Error 'Unknown signer certificate' } ; \ Start-Process msiexec.exe -ArgumentList '/i', 'yarn.msi', '/quiet', '/norestart' -NoNewWindow -Wait -FROM microsoft/windowsservercore - -SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] - -ENV NODE_VERSION 6.14.2 -ENV YARN_VERSION 1.6.0 - -COPY --from=download /nodejs /nodejs -COPY --from=download [ "/Program Files (x86)/yarn", "/yarn" ] - RUN New-Item $($env:APPDATA + '\npm') -Type Directory ; \ $env:PATH = 'C:\nodejs;{0}\npm;C:\yarn\bin;{1}' -f $env:APPDATA, $env:PATH ; \ [Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine) diff --git a/8/windows/nanoserver/Dockerfile b/8/windows/nanoserver/Dockerfile index 04e196219..f6b5d4a53 100644 --- a/8/windows/nanoserver/Dockerfile +++ b/8/windows/nanoserver/Dockerfile @@ -1,4 +1,4 @@ -FROM microsoft/windowsservercore as download +FROM microsoft/nanoserver SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] @@ -6,8 +6,7 @@ ENV NODE_VERSION 8.11.2 ENV GPG_VERSION 2.3.4 -RUN [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12 ; \ - Invoke-WebRequest $('https://files.gpg4win.org/gpg4win-vanilla-{0}.exe' -f $env:GPG_VERSION) -OutFile 'gpg4win.exe' -UseBasicParsing ; \ +RUN Invoke-WebRequest $('https://files.gpg4win.org/gpg4win-vanilla-{0}.exe' -f $env:GPG_VERSION) -OutFile 'gpg4win.exe' -UseBasicParsing ; \ Start-Process .\gpg4win.exe -ArgumentList '/S' -NoNewWindow -Wait ; RUN @( \ @@ -23,7 +22,7 @@ RUN @( \ ) | foreach { \ gpg --keyserver ha.pool.sks-keyservers.net --recv-keys $_ ; \ } ; \ - [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12 ; \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 ; \ Invoke-WebRequest $('https://nodejs.org/dist/v{0}/SHASUMS256.txt.asc' -f $env:NODE_VERSION) -OutFile 'SHASUMS256.txt.asc' -UseBasicParsing ; \ gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc ; \ Invoke-WebRequest $('https://nodejs.org/dist/v{0}/node-v{0}-win-x64.zip' -f $env:NODE_VERSION) -OutFile 'node.zip' -UseBasicParsing ; \ @@ -34,7 +33,7 @@ RUN @( \ ENV YARN_VERSION 1.6.0 -RUN [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12 ; \ +RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 ; \ Invoke-WebRequest $('https://yarnpkg.com/downloads/{0}/yarn-{0}.msi' -f $env:YARN_VERSION) -OutFile yarn.msi -UseBasicParsing ; \ $sig = Get-AuthenticodeSignature -filepath yarn.msi ; \ if ($sig.Status -ne 'Valid') { Write-Error 'Authenticode signature is not valid' } ; \ @@ -43,16 +42,6 @@ RUN [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityPro ) -notcontains $sig.SignerCertificate.Thumbprint) { Write-Error 'Unknown signer certificate' } ; \ Start-Process msiexec.exe -ArgumentList '/i', 'yarn.msi', '/quiet', '/norestart' -NoNewWindow -Wait -FROM microsoft/nanoserver - -SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] - -ENV NODE_VERSION 8.11.2 -ENV YARN_VERSION 1.6.0 - -COPY --from=download /nodejs /nodejs -COPY --from=download [ "/Program Files (x86)/yarn", "/yarn" ] - RUN New-Item $($env:APPDATA + '\npm') -Type Directory ; \ $env:PATH = 'C:\nodejs;{0}\npm;C:\yarn\bin;{1}' -f $env:APPDATA, $env:PATH ; \ Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\' -Name Path -Value $env:PATH diff --git a/8/windows/windowsservercore/Dockerfile b/8/windows/windowsservercore/Dockerfile index a901fe55f..576722de2 100644 --- a/8/windows/windowsservercore/Dockerfile +++ b/8/windows/windowsservercore/Dockerfile @@ -1,4 +1,4 @@ -FROM microsoft/windowsservercore as download +FROM microsoft/windowsservercore SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] @@ -43,16 +43,6 @@ RUN [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityPro ) -notcontains $sig.SignerCertificate.Thumbprint) { Write-Error 'Unknown signer certificate' } ; \ Start-Process msiexec.exe -ArgumentList '/i', 'yarn.msi', '/quiet', '/norestart' -NoNewWindow -Wait -FROM microsoft/windowsservercore - -SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] - -ENV NODE_VERSION 8.11.2 -ENV YARN_VERSION 1.6.0 - -COPY --from=download /nodejs /nodejs -COPY --from=download [ "/Program Files (x86)/yarn", "/yarn" ] - RUN New-Item $($env:APPDATA + '\npm') -Type Directory ; \ $env:PATH = 'C:\nodejs;{0}\npm;C:\yarn\bin;{1}' -f $env:APPDATA, $env:PATH ; \ [Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine) diff --git a/9/windows/nanoserver/Dockerfile b/9/windows/nanoserver/Dockerfile index cf93d126a..5d78917c0 100644 --- a/9/windows/nanoserver/Dockerfile +++ b/9/windows/nanoserver/Dockerfile @@ -1,4 +1,4 @@ -FROM microsoft/windowsservercore as download +FROM microsoft/nanoserver SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] @@ -6,8 +6,7 @@ ENV NODE_VERSION 9.11.1 ENV GPG_VERSION 2.3.4 -RUN [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12 ; \ - Invoke-WebRequest $('https://files.gpg4win.org/gpg4win-vanilla-{0}.exe' -f $env:GPG_VERSION) -OutFile 'gpg4win.exe' -UseBasicParsing ; \ +RUN Invoke-WebRequest $('https://files.gpg4win.org/gpg4win-vanilla-{0}.exe' -f $env:GPG_VERSION) -OutFile 'gpg4win.exe' -UseBasicParsing ; \ Start-Process .\gpg4win.exe -ArgumentList '/S' -NoNewWindow -Wait ; RUN @( \ @@ -23,7 +22,7 @@ RUN @( \ ) | foreach { \ gpg --keyserver ha.pool.sks-keyservers.net --recv-keys $_ ; \ } ; \ - [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12 ; \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 ; \ Invoke-WebRequest $('https://nodejs.org/dist/v{0}/SHASUMS256.txt.asc' -f $env:NODE_VERSION) -OutFile 'SHASUMS256.txt.asc' -UseBasicParsing ; \ gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc ; \ Invoke-WebRequest $('https://nodejs.org/dist/v{0}/node-v{0}-win-x64.zip' -f $env:NODE_VERSION) -OutFile 'node.zip' -UseBasicParsing ; \ @@ -34,7 +33,7 @@ RUN @( \ ENV YARN_VERSION 1.5.1 -RUN [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12 ; \ +RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 ; \ Invoke-WebRequest $('https://yarnpkg.com/downloads/{0}/yarn-{0}.msi' -f $env:YARN_VERSION) -OutFile yarn.msi -UseBasicParsing ; \ $sig = Get-AuthenticodeSignature -filepath yarn.msi ; \ if ($sig.Status -ne 'Valid') { Write-Error 'Authenticode signature is not valid' } ; \ @@ -43,16 +42,6 @@ RUN [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityPro ) -notcontains $sig.SignerCertificate.Thumbprint) { Write-Error 'Unknown signer certificate' } ; \ Start-Process msiexec.exe -ArgumentList '/i', 'yarn.msi', '/quiet', '/norestart' -NoNewWindow -Wait -FROM microsoft/nanoserver - -SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] - -ENV NODE_VERSION 9.11.1 -ENV YARN_VERSION 1.5.1 - -COPY --from=download /nodejs /nodejs -COPY --from=download [ "/Program Files (x86)/yarn", "/yarn" ] - RUN New-Item $($env:APPDATA + '\npm') -Type Directory ; \ $env:PATH = 'C:\nodejs;{0}\npm;C:\yarn\bin;{1}' -f $env:APPDATA, $env:PATH ; \ Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\' -Name Path -Value $env:PATH diff --git a/9/windows/windowsservercore/Dockerfile b/9/windows/windowsservercore/Dockerfile index 95128a005..f1ef95d4c 100644 --- a/9/windows/windowsservercore/Dockerfile +++ b/9/windows/windowsservercore/Dockerfile @@ -1,4 +1,4 @@ -FROM microsoft/windowsservercore as download +FROM microsoft/windowsservercore SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] @@ -43,16 +43,6 @@ RUN [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityPro ) -notcontains $sig.SignerCertificate.Thumbprint) { Write-Error 'Unknown signer certificate' } ; \ Start-Process msiexec.exe -ArgumentList '/i', 'yarn.msi', '/quiet', '/norestart' -NoNewWindow -Wait -FROM microsoft/windowsservercore - -SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] - -ENV NODE_VERSION 9.11.1 -ENV YARN_VERSION 1.5.1 - -COPY --from=download /nodejs /nodejs -COPY --from=download [ "/Program Files (x86)/yarn", "/yarn" ] - RUN New-Item $($env:APPDATA + '\npm') -Type Directory ; \ $env:PATH = 'C:\nodejs;{0}\npm;C:\yarn\bin;{1}' -f $env:APPDATA, $env:PATH ; \ [Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine) diff --git a/Dockerfile-nanoserver.template b/Dockerfile-nanoserver.template index d03d6cb0f..95c11ba37 100644 --- a/Dockerfile-nanoserver.template +++ b/Dockerfile-nanoserver.template @@ -1,4 +1,4 @@ -FROM microsoft/windowsservercore as download +FROM microsoft/nanoserver SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] @@ -6,8 +6,7 @@ ENV NODE_VERSION 0.0.0 ENV GPG_VERSION 2.3.4 -RUN [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12 ; \ - Invoke-WebRequest $('https://files.gpg4win.org/gpg4win-vanilla-{0}.exe' -f $env:GPG_VERSION) -OutFile 'gpg4win.exe' -UseBasicParsing ; \ +RUN Invoke-WebRequest $('https://files.gpg4win.org/gpg4win-vanilla-{0}.exe' -f $env:GPG_VERSION) -OutFile 'gpg4win.exe' -UseBasicParsing ; \ Start-Process .\gpg4win.exe -ArgumentList '/S' -NoNewWindow -Wait ; RUN @( \ @@ -15,7 +14,7 @@ RUN @( \ ) | foreach { \ gpg --keyserver ha.pool.sks-keyservers.net --recv-keys $_ ; \ } ; \ - [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12 ; \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 ; \ Invoke-WebRequest $('https://nodejs.org/dist/v{0}/SHASUMS256.txt.asc' -f $env:NODE_VERSION) -OutFile 'SHASUMS256.txt.asc' -UseBasicParsing ; \ gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc ; \ Invoke-WebRequest $('https://nodejs.org/dist/v{0}/node-v{0}-win-x64.zip' -f $env:NODE_VERSION) -OutFile 'node.zip' -UseBasicParsing ; \ @@ -26,7 +25,7 @@ RUN @( \ ENV YARN_VERSION 0.0.0 -RUN [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12 ; \ +RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 ; \ Invoke-WebRequest $('https://yarnpkg.com/downloads/{0}/yarn-{0}.msi' -f $env:YARN_VERSION) -OutFile yarn.msi -UseBasicParsing ; \ $sig = Get-AuthenticodeSignature -filepath yarn.msi ; \ if ($sig.Status -ne 'Valid') { Write-Error 'Authenticode signature is not valid' } ; \ @@ -35,16 +34,6 @@ RUN [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityPro ) -notcontains $sig.SignerCertificate.Thumbprint) { Write-Error 'Unknown signer certificate' } ; \ Start-Process msiexec.exe -ArgumentList '/i', 'yarn.msi', '/quiet', '/norestart' -NoNewWindow -Wait -FROM microsoft/nanoserver - -SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] - -ENV NODE_VERSION 0.0.0 -ENV YARN_VERSION 0.0.0 - -COPY --from=download /nodejs /nodejs -COPY --from=download [ "/Program Files (x86)/yarn", "/yarn" ] - RUN New-Item $($env:APPDATA + '\npm') -Type Directory ; \ $env:PATH = 'C:\nodejs;{0}\npm;C:\yarn\bin;{1}' -f $env:APPDATA, $env:PATH ; \ Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\' -Name Path -Value $env:PATH diff --git a/Dockerfile-windowsservercore.template b/Dockerfile-windowsservercore.template index 8ea8b5f17..83bf87bdc 100644 --- a/Dockerfile-windowsservercore.template +++ b/Dockerfile-windowsservercore.template @@ -1,4 +1,4 @@ -FROM microsoft/windowsservercore as download +FROM microsoft/windowsservercore SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] @@ -35,16 +35,6 @@ RUN [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityPro ) -notcontains $sig.SignerCertificate.Thumbprint) { Write-Error 'Unknown signer certificate' } ; \ Start-Process msiexec.exe -ArgumentList '/i', 'yarn.msi', '/quiet', '/norestart' -NoNewWindow -Wait -FROM microsoft/windowsservercore - -SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] - -ENV NODE_VERSION 0.0.0 -ENV YARN_VERSION 0.0.0 - -COPY --from=download /nodejs /nodejs -COPY --from=download [ "/Program Files (x86)/yarn", "/yarn" ] - RUN New-Item $($env:APPDATA + '\npm') -Type Directory ; \ $env:PATH = 'C:\nodejs;{0}\npm;C:\yarn\bin;{1}' -f $env:APPDATA, $env:PATH ; \ [Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine) diff --git a/test.sh b/test.sh new file mode 100755 index 000000000..c7872fd5e --- /dev/null +++ b/test.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +. functions.sh + +images_updated "947280600648b70e067d35415d6812fd03127def" "35f1c9e977d23bd306212c73612f7bf55bc6d615" && echo "test" +images_updated "947280600648b70e067d35415d6812fd03127def..35f1c9e977d23bd306212c73612f7bf55bc6d615" && echo "test" +images_updated "947280600648b70e067d35415d6812fd03127def" && echo "test" +images_updated || echo "test" +images_updated "e5cebee5dbf9...4000fe6354dd" || echo "test"