diff --git a/1.11/windows/windowsservercore-1903/Dockerfile b/1.11/windows/windowsservercore-1903/Dockerfile new file mode 100644 index 00000000..1225a916 --- /dev/null +++ b/1.11/windows/windowsservercore-1903/Dockerfile @@ -0,0 +1,73 @@ +FROM mcr.microsoft.com/windows/servercore:1903 + +# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 +SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +# install MinGit (especially for "go get") +# https://blogs.msdn.microsoft.com/visualstudioalm/2016/09/03/whats-new-in-git-for-windows-2-10/ +# "Essentially, it is a Git for Windows that was stripped down as much as possible without sacrificing the functionality in which 3rd-party software may be interested." +# "It currently requires only ~45MB on disk." +ENV GIT_VERSION 2.11.1 +ENV GIT_TAG v${GIT_VERSION}.windows.1 +ENV GIT_DOWNLOAD_URL https://github.com/git-for-windows/git/releases/download/${GIT_TAG}/MinGit-${GIT_VERSION}-64-bit.zip +ENV GIT_DOWNLOAD_SHA256 668d16a799dd721ed126cc91bed49eb2c072ba1b25b50048280a4e2c5ed56e59 +# steps inspired by "chcolateyInstall.ps1" from "git.install" (https://chocolatey.org/packages/git.install) +RUN Write-Host ('Downloading {0} ...' -f $env:GIT_DOWNLOAD_URL); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + Invoke-WebRequest -Uri $env:GIT_DOWNLOAD_URL -OutFile 'git.zip'; \ + \ + Write-Host ('Verifying sha256 ({0}) ...' -f $env:GIT_DOWNLOAD_SHA256); \ + if ((Get-FileHash git.zip -Algorithm sha256).Hash -ne $env:GIT_DOWNLOAD_SHA256) { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + \ + Write-Host 'Expanding ...'; \ + Expand-Archive -Path git.zip -DestinationPath C:\git\.; \ + \ + Write-Host 'Removing ...'; \ + Remove-Item git.zip -Force; \ + \ + Write-Host 'Updating PATH ...'; \ + $env:PATH = 'C:\git\cmd;C:\git\mingw64\bin;C:\git\usr\bin;' + $env:PATH; \ + [Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine); \ + \ + Write-Host 'Verifying install ...'; \ + Write-Host ' git --version'; git --version; \ + \ + Write-Host 'Complete.'; + +# ideally, this would be C:\go to match Linux a bit closer, but C:\go is the recommended install path for Go itself on Windows +ENV GOPATH C:\\gopath + +# PATH isn't actually set in the Docker image, so we have to set it from within the container +RUN $newPath = ('{0}\bin;C:\go\bin;{1}' -f $env:GOPATH, $env:PATH); \ + Write-Host ('Updating PATH: {0}' -f $newPath); \ + [Environment]::SetEnvironmentVariable('PATH', $newPath, [EnvironmentVariableTarget]::Machine); +# doing this first to share cache across versions more aggressively + +ENV GOLANG_VERSION 1.11.12 + +RUN $url = ('https://golang.org/dl/go{0}.windows-amd64.zip' -f $env:GOLANG_VERSION); \ + Write-Host ('Downloading {0} ...' -f $url); \ + Invoke-WebRequest -Uri $url -OutFile 'go.zip'; \ + \ + $sha256 = 'a86e41e06d39f68ea8fa6a7765ce529abe3ec5037ba3a3bff2e6d25455a4fa34'; \ + Write-Host ('Verifying sha256 ({0}) ...' -f $sha256); \ + if ((Get-FileHash go.zip -Algorithm sha256).Hash -ne $sha256) { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + \ + Write-Host 'Expanding ...'; \ + Expand-Archive go.zip -DestinationPath C:\; \ + \ + Write-Host 'Verifying install ("go version") ...'; \ + go version; \ + \ + Write-Host 'Removing ...'; \ + Remove-Item go.zip -Force; \ + \ + Write-Host 'Complete.'; + +WORKDIR $GOPATH diff --git a/1.12/windows/windowsservercore-1903/Dockerfile b/1.12/windows/windowsservercore-1903/Dockerfile new file mode 100644 index 00000000..aeff554b --- /dev/null +++ b/1.12/windows/windowsservercore-1903/Dockerfile @@ -0,0 +1,73 @@ +FROM mcr.microsoft.com/windows/servercore:1903 + +# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 +SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +# install MinGit (especially for "go get") +# https://blogs.msdn.microsoft.com/visualstudioalm/2016/09/03/whats-new-in-git-for-windows-2-10/ +# "Essentially, it is a Git for Windows that was stripped down as much as possible without sacrificing the functionality in which 3rd-party software may be interested." +# "It currently requires only ~45MB on disk." +ENV GIT_VERSION 2.11.1 +ENV GIT_TAG v${GIT_VERSION}.windows.1 +ENV GIT_DOWNLOAD_URL https://github.com/git-for-windows/git/releases/download/${GIT_TAG}/MinGit-${GIT_VERSION}-64-bit.zip +ENV GIT_DOWNLOAD_SHA256 668d16a799dd721ed126cc91bed49eb2c072ba1b25b50048280a4e2c5ed56e59 +# steps inspired by "chcolateyInstall.ps1" from "git.install" (https://chocolatey.org/packages/git.install) +RUN Write-Host ('Downloading {0} ...' -f $env:GIT_DOWNLOAD_URL); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + Invoke-WebRequest -Uri $env:GIT_DOWNLOAD_URL -OutFile 'git.zip'; \ + \ + Write-Host ('Verifying sha256 ({0}) ...' -f $env:GIT_DOWNLOAD_SHA256); \ + if ((Get-FileHash git.zip -Algorithm sha256).Hash -ne $env:GIT_DOWNLOAD_SHA256) { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + \ + Write-Host 'Expanding ...'; \ + Expand-Archive -Path git.zip -DestinationPath C:\git\.; \ + \ + Write-Host 'Removing ...'; \ + Remove-Item git.zip -Force; \ + \ + Write-Host 'Updating PATH ...'; \ + $env:PATH = 'C:\git\cmd;C:\git\mingw64\bin;C:\git\usr\bin;' + $env:PATH; \ + [Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine); \ + \ + Write-Host 'Verifying install ...'; \ + Write-Host ' git --version'; git --version; \ + \ + Write-Host 'Complete.'; + +# ideally, this would be C:\go to match Linux a bit closer, but C:\go is the recommended install path for Go itself on Windows +ENV GOPATH C:\\gopath + +# PATH isn't actually set in the Docker image, so we have to set it from within the container +RUN $newPath = ('{0}\bin;C:\go\bin;{1}' -f $env:GOPATH, $env:PATH); \ + Write-Host ('Updating PATH: {0}' -f $newPath); \ + [Environment]::SetEnvironmentVariable('PATH', $newPath, [EnvironmentVariableTarget]::Machine); +# doing this first to share cache across versions more aggressively + +ENV GOLANG_VERSION 1.12.7 + +RUN $url = ('https://golang.org/dl/go{0}.windows-amd64.zip' -f $env:GOLANG_VERSION); \ + Write-Host ('Downloading {0} ...' -f $url); \ + Invoke-WebRequest -Uri $url -OutFile 'go.zip'; \ + \ + $sha256 = '502712c0e29edc6b9cda6fa5e4b6ff9b36e27d225373baead8708c9634aa8e50'; \ + Write-Host ('Verifying sha256 ({0}) ...' -f $sha256); \ + if ((Get-FileHash go.zip -Algorithm sha256).Hash -ne $sha256) { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + \ + Write-Host 'Expanding ...'; \ + Expand-Archive go.zip -DestinationPath C:\; \ + \ + Write-Host 'Verifying install ("go version") ...'; \ + go version; \ + \ + Write-Host 'Removing ...'; \ + Remove-Item go.zip -Force; \ + \ + Write-Host 'Complete.'; + +WORKDIR $GOPATH diff --git a/1.13-rc/windows/windowsservercore-1903/Dockerfile b/1.13-rc/windows/windowsservercore-1903/Dockerfile new file mode 100644 index 00000000..32c7b379 --- /dev/null +++ b/1.13-rc/windows/windowsservercore-1903/Dockerfile @@ -0,0 +1,73 @@ +FROM mcr.microsoft.com/windows/servercore:1903 + +# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 +SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +# install MinGit (especially for "go get") +# https://blogs.msdn.microsoft.com/visualstudioalm/2016/09/03/whats-new-in-git-for-windows-2-10/ +# "Essentially, it is a Git for Windows that was stripped down as much as possible without sacrificing the functionality in which 3rd-party software may be interested." +# "It currently requires only ~45MB on disk." +ENV GIT_VERSION 2.11.1 +ENV GIT_TAG v${GIT_VERSION}.windows.1 +ENV GIT_DOWNLOAD_URL https://github.com/git-for-windows/git/releases/download/${GIT_TAG}/MinGit-${GIT_VERSION}-64-bit.zip +ENV GIT_DOWNLOAD_SHA256 668d16a799dd721ed126cc91bed49eb2c072ba1b25b50048280a4e2c5ed56e59 +# steps inspired by "chcolateyInstall.ps1" from "git.install" (https://chocolatey.org/packages/git.install) +RUN Write-Host ('Downloading {0} ...' -f $env:GIT_DOWNLOAD_URL); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + Invoke-WebRequest -Uri $env:GIT_DOWNLOAD_URL -OutFile 'git.zip'; \ + \ + Write-Host ('Verifying sha256 ({0}) ...' -f $env:GIT_DOWNLOAD_SHA256); \ + if ((Get-FileHash git.zip -Algorithm sha256).Hash -ne $env:GIT_DOWNLOAD_SHA256) { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + \ + Write-Host 'Expanding ...'; \ + Expand-Archive -Path git.zip -DestinationPath C:\git\.; \ + \ + Write-Host 'Removing ...'; \ + Remove-Item git.zip -Force; \ + \ + Write-Host 'Updating PATH ...'; \ + $env:PATH = 'C:\git\cmd;C:\git\mingw64\bin;C:\git\usr\bin;' + $env:PATH; \ + [Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine); \ + \ + Write-Host 'Verifying install ...'; \ + Write-Host ' git --version'; git --version; \ + \ + Write-Host 'Complete.'; + +# ideally, this would be C:\go to match Linux a bit closer, but C:\go is the recommended install path for Go itself on Windows +ENV GOPATH C:\\gopath + +# PATH isn't actually set in the Docker image, so we have to set it from within the container +RUN $newPath = ('{0}\bin;C:\go\bin;{1}' -f $env:GOPATH, $env:PATH); \ + Write-Host ('Updating PATH: {0}' -f $newPath); \ + [Environment]::SetEnvironmentVariable('PATH', $newPath, [EnvironmentVariableTarget]::Machine); +# doing this first to share cache across versions more aggressively + +ENV GOLANG_VERSION 1.13beta1 + +RUN $url = ('https://golang.org/dl/go{0}.windows-amd64.zip' -f $env:GOLANG_VERSION); \ + Write-Host ('Downloading {0} ...' -f $url); \ + Invoke-WebRequest -Uri $url -OutFile 'go.zip'; \ + \ + $sha256 = '08098b4b0e1a105971d2fced2842e806f8ffa08973ae8781fd22dd90f76404fb'; \ + Write-Host ('Verifying sha256 ({0}) ...' -f $sha256); \ + if ((Get-FileHash go.zip -Algorithm sha256).Hash -ne $sha256) { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + \ + Write-Host 'Expanding ...'; \ + Expand-Archive go.zip -DestinationPath C:\; \ + \ + Write-Host 'Verifying install ("go version") ...'; \ + go version; \ + \ + Write-Host 'Removing ...'; \ + Remove-Item go.zip -Force; \ + \ + Write-Host 'Complete.'; + +WORKDIR $GOPATH diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index a4078e51..fe421bda 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -74,7 +74,7 @@ for version in "${versions[@]}"; do for v in \ buster stretch alpine{3.10,3.9} \ - windows/windowsservercore-{ltsc2016,1803,1809} \ + windows/windowsservercore-{ltsc2016,1803,1809,1903} \ windows/nanoserver-{1803,1809} \ ; do dir="$version/$v" diff --git a/update.sh b/update.sh index 9697d20c..bd07bf62 100755 --- a/update.sh +++ b/update.sh @@ -107,7 +107,7 @@ for version in "${versions[@]}"; do for winVariant in \ nanoserver-{1803,1809} \ - windowsservercore-{ltsc2016,1803,1809} \ + windowsservercore-{ltsc2016,1803,1809,1903} \ ; do if [ -d "$version/windows/$winVariant" ]; then sed -r \