From b50f8e3b0f700ac49eb566ac619488e1fd586fb7 Mon Sep 17 00:00:00 2001 From: Alistair Burrowes Date: Wed, 12 Jan 2022 20:00:11 +1100 Subject: [PATCH 01/25] Very early exploration --- .github/workflows/windows.yml | 41 +++++++++++++++++++ .../windowsservercore-ltsc2016/Dockerfile | 4 ++ 2 files changed, 45 insertions(+) create mode 100644 .github/workflows/windows.yml create mode 100644 9.0/windows/windowsservercore-ltsc2016/Dockerfile diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml new file mode 100644 index 0000000..26582f1 --- /dev/null +++ b/.github/workflows/windows.yml @@ -0,0 +1,41 @@ +name: Validate Windows + +on: + pull_request: + branches: + - master + paths: + - '**/windows/**/Dockerfile' + - '.github/workflows/windows.yml' + +jobs: + build-smoke-test: + timeout-minutes: 30 + runs-on: windows-latest + name: ${{ matrix.ghc }}-alpine${{ matrix.os_version }} + strategy: + fail-fast: false + matrix: + ghc: ['9.0.2'] + os_version: ['ltsc2016'] + include: + - ghc: '9.0.2' + ghc_minor: '9.0' + steps: + - uses: actions/checkout@v2 + - name: build + smoke test [${{ matrix.ghc }}] + uses: nick-invision/retry@v2 + with: + timeout_minutes: 8 + max_attempts: 3 + command: | + docker build --pull \ + -t haskell:${{ matrix.ghc }}-windowsservercore-${{ matrix.os_version }} \ + ${{ matrix.ghc_minor }}/windowsservercore-${{ matrix.os_version }} + # - uses: actions/checkout@v2 + # with: + # repository: AlistairB/official-images + # ref: haskell-sh + # path: official-images + # - name: run official-images tests + # run: ./official-images/test/run.sh haskell:${{ matrix.ghc }}-alpine${{ matrix.os_version }} diff --git a/9.0/windows/windowsservercore-ltsc2016/Dockerfile b/9.0/windows/windowsservercore-ltsc2016/Dockerfile new file mode 100644 index 0000000..4fde8a5 --- /dev/null +++ b/9.0/windows/windowsservercore-ltsc2016/Dockerfile @@ -0,0 +1,4 @@ +FROM mcr.microsoft.com/windows/servercore:ltsc2016 + +# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 +SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] From 8a150999d7dca8fe8d035546f2490d346c31eab5 Mon Sep 17 00:00:00 2001 From: Alistair Burrowes Date: Sat, 15 Jan 2022 15:43:32 +1100 Subject: [PATCH 02/25] Basic ghc install seems to work --- .github/workflows/windows.yml | 4 +- 9.0/windows/windowsservercore-1809/Dockerfile | 38 +++++++++++++++++++ .../windowsservercore-ltsc2016/Dockerfile | 4 -- 3 files changed, 40 insertions(+), 6 deletions(-) create mode 100644 9.0/windows/windowsservercore-1809/Dockerfile delete mode 100644 9.0/windows/windowsservercore-ltsc2016/Dockerfile diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 26582f1..dcca75d 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -12,12 +12,12 @@ jobs: build-smoke-test: timeout-minutes: 30 runs-on: windows-latest - name: ${{ matrix.ghc }}-alpine${{ matrix.os_version }} + name: ${{ matrix.ghc }}-windowsservercore-${{ matrix.os_version }} strategy: fail-fast: false matrix: ghc: ['9.0.2'] - os_version: ['ltsc2016'] + os_version: ['1809'] include: - ghc: '9.0.2' ghc_minor: '9.0' diff --git a/9.0/windows/windowsservercore-1809/Dockerfile b/9.0/windows/windowsservercore-1809/Dockerfile new file mode 100644 index 0000000..4d9a9cd --- /dev/null +++ b/9.0/windows/windowsservercore-1809/Dockerfile @@ -0,0 +1,38 @@ +FROM mcr.microsoft.com/windows/servercore:1809 + +# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 +SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +# PATH isn't actually set in the Docker image, so we have to set it from within the container +RUN $newPath = ('{0}\bin;C:\Program Files\ghc\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 + +RUN $url = 'https://downloads.haskell.org/~ghc/9.0.2/ghc-9.0.2-x86_64-unknown-mingw32.zip'; \ + Write-Host ('Downloading {0} ...' -f $url); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + Invoke-WebRequest -Uri $url -OutFile 'ghc.zip'; \ + \ + $sha256 = 'ddd22abb7e6731506320585bffa11a4182fd6b4f9751111a588409568fd95d9f'; \ + Write-Host ('Verifying sha256 ({0}) ...' -f $sha256); \ + if ((Get-FileHash ghc.zip -Algorithm sha256).Hash -ne $sha256) { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + \ + Write-Host 'Expanding ...'; \ + Expand-Archive ghc.zip -DestinationPath C:\; \ + \ + Write-Host 'Moving ...'; \ + Move-Item -Path C:\ghc-9.0.2-x86_64-unknown-mingw32 -Destination 'C:\Program Files\ghc'; \ + \ + Write-Host 'Removing ...'; \ + Remove-Item ghc.zip -Force; \ + \ + Write-Host 'Verifying install ("ghc --version") ...'; \ + ghc --version; \ + \ + Write-Host 'Complete.'; + +CMD ["ghci"] \ No newline at end of file diff --git a/9.0/windows/windowsservercore-ltsc2016/Dockerfile b/9.0/windows/windowsservercore-ltsc2016/Dockerfile deleted file mode 100644 index 4fde8a5..0000000 --- a/9.0/windows/windowsservercore-ltsc2016/Dockerfile +++ /dev/null @@ -1,4 +0,0 @@ -FROM mcr.microsoft.com/windows/servercore:ltsc2016 - -# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 -SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] From 11f2e5a2ec1a5b832ed0c6f4ac2486fefa7dfe76 Mon Sep 17 00:00:00 2001 From: Alistair Burrowes Date: Sat, 15 Jan 2022 16:01:42 +1100 Subject: [PATCH 03/25] hmm this work? --- .github/workflows/windows.yml | 14 +++----- 9.0/windows/windowsservercore-1809/Dockerfile | 35 +++++++++++++++++-- 2 files changed, 36 insertions(+), 13 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index dcca75d..d229c62 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -22,16 +22,10 @@ jobs: - ghc: '9.0.2' ghc_minor: '9.0' steps: - - uses: actions/checkout@v2 - - name: build + smoke test [${{ matrix.ghc }}] - uses: nick-invision/retry@v2 - with: - timeout_minutes: 8 - max_attempts: 3 - command: | - docker build --pull \ - -t haskell:${{ matrix.ghc }}-windowsservercore-${{ matrix.os_version }} \ - ${{ matrix.ghc_minor }}/windowsservercore-${{ matrix.os_version }} + run: | + docker build --pull \ + -t haskell:${{ matrix.ghc }}-windowsservercore-${{ matrix.os_version }} \ + ${{ matrix.ghc_minor }}/windowsservercore-${{ matrix.os_version }} # - uses: actions/checkout@v2 # with: # repository: AlistairB/official-images diff --git a/9.0/windows/windowsservercore-1809/Dockerfile b/9.0/windows/windowsservercore-1809/Dockerfile index 4d9a9cd..c8987bd 100644 --- a/9.0/windows/windowsservercore-1809/Dockerfile +++ b/9.0/windows/windowsservercore-1809/Dockerfile @@ -4,12 +4,41 @@ FROM mcr.microsoft.com/windows/servercore:1809 SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] # PATH isn't actually set in the Docker image, so we have to set it from within the container -RUN $newPath = ('{0}\bin;C:\Program Files\ghc\bin;{1}' -f $env:GOPATH, $env:PATH); \ +RUN $newPath = ('{0}\bin;C:\Program Files\ghc\bin;C:\Program Files\cabal-install\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 -RUN $url = 'https://downloads.haskell.org/~ghc/9.0.2/ghc-9.0.2-x86_64-unknown-mingw32.zip'; \ +# RUN $cabalInstallVersion = '3.6.2.0'; \ +# $url = (https://downloads.haskell.org/~cabal/cabal-install-{0}/cabal-install-{0}-x86_64-windows.zip' -f $cabalInstallVersion); \ +# Write-Host ('Downloading {0} ...' -f $url); \ +# [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ +# Invoke-WebRequest -Uri $url -OutFile 'cabal-install.zip'; \ +# \ +# $sha256 = '89aa3aa3f76d15182c0d03227639890cd537627ba0bf0ef9ab451fee504b24c6'; \ +# Write-Host ('Verifying sha256 ({0}) ...' -f $sha256); \ +# if ((Get-FileHash cabal-install.zip -Algorithm sha256).Hash -ne $sha256) { \ +# Write-Host 'FAILED!'; \ +# exit 1; \ +# }; \ +# \ +# Write-Host 'Expanding ...'; \ +# Expand-Archive ghc.zip -DestinationPath C:\; \ +# \ +# Write-Host 'Moving ...'; \ +# Move-Item -Path ('C:\{0}' -f $releaseName) -Destination 'C:\Program Files\ghc'; \ +# \ +# Write-Host 'Removing ...'; \ +# Remove-Item ghc.zip -Force; \ +# \ +# Write-Host 'Verifying install ("ghc --version") ...'; \ +# ghc --version; \ +# \ +# Write-Host 'Complete.'; + +RUN $ghcVersion = '9.0.2'; \ + $releaseName = ('ghc-{0}-x86_64-unknown-mingw32' -f $ghcVersion); \ + $url = ('https://downloads.haskell.org/~ghc/{0}/{1}.zip' -f $ghcVersion, $releaseName); \ Write-Host ('Downloading {0} ...' -f $url); \ [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ Invoke-WebRequest -Uri $url -OutFile 'ghc.zip'; \ @@ -25,7 +54,7 @@ RUN $url = 'https://downloads.haskell.org/~ghc/9.0.2/ghc-9.0.2-x86_64-unknown-mi Expand-Archive ghc.zip -DestinationPath C:\; \ \ Write-Host 'Moving ...'; \ - Move-Item -Path C:\ghc-9.0.2-x86_64-unknown-mingw32 -Destination 'C:\Program Files\ghc'; \ + Move-Item -Path ('C:\{0}' -f $releaseName) -Destination 'C:\Program Files\ghc'; \ \ Write-Host 'Removing ...'; \ Remove-Item ghc.zip -Force; \ From 2e7fd29a4accf191cc563e09eff50adbf302a44f Mon Sep 17 00:00:00 2001 From: Alistair Burrowes Date: Sat, 15 Jan 2022 16:57:58 +1100 Subject: [PATCH 04/25] Add cabal --- 9.0/windows/windowsservercore-1809/Dockerfile | 55 ++++++++++--------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/9.0/windows/windowsservercore-1809/Dockerfile b/9.0/windows/windowsservercore-1809/Dockerfile index c8987bd..607e1cb 100644 --- a/9.0/windows/windowsservercore-1809/Dockerfile +++ b/9.0/windows/windowsservercore-1809/Dockerfile @@ -4,37 +4,38 @@ FROM mcr.microsoft.com/windows/servercore:1809 SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] # PATH isn't actually set in the Docker image, so we have to set it from within the container -RUN $newPath = ('{0}\bin;C:\Program Files\ghc\bin;C:\Program Files\cabal-install\bin;{1}' -f $env:GOPATH, $env:PATH); \ +RUN $newPath = ('C:\Program Files\ghc\bin;C:\Program Files\cabal-install;{0}' -f $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 -# RUN $cabalInstallVersion = '3.6.2.0'; \ -# $url = (https://downloads.haskell.org/~cabal/cabal-install-{0}/cabal-install-{0}-x86_64-windows.zip' -f $cabalInstallVersion); \ -# Write-Host ('Downloading {0} ...' -f $url); \ -# [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ -# Invoke-WebRequest -Uri $url -OutFile 'cabal-install.zip'; \ -# \ -# $sha256 = '89aa3aa3f76d15182c0d03227639890cd537627ba0bf0ef9ab451fee504b24c6'; \ -# Write-Host ('Verifying sha256 ({0}) ...' -f $sha256); \ -# if ((Get-FileHash cabal-install.zip -Algorithm sha256).Hash -ne $sha256) { \ -# Write-Host 'FAILED!'; \ -# exit 1; \ -# }; \ -# \ -# Write-Host 'Expanding ...'; \ -# Expand-Archive ghc.zip -DestinationPath C:\; \ -# \ -# Write-Host 'Moving ...'; \ -# Move-Item -Path ('C:\{0}' -f $releaseName) -Destination 'C:\Program Files\ghc'; \ -# \ -# Write-Host 'Removing ...'; \ -# Remove-Item ghc.zip -Force; \ -# \ -# Write-Host 'Verifying install ("ghc --version") ...'; \ -# ghc --version; \ -# \ -# Write-Host 'Complete.'; +RUN $cabalInstallVersion = '3.6.2.0'; \ + $url = ('https://downloads.haskell.org/~cabal/cabal-install-{0}/cabal-install-{0}-x86_64-windows.zip' -f $cabalInstallVersion); \ + Write-Host ('Downloading {0} ...' -f $url); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + Invoke-WebRequest -Uri $url -OutFile 'cabal-install.zip'; \ + \ + $sha256 = '89aa3aa3f76d15182c0d03227639890cd537627ba0bf0ef9ab451fee504b24c6'; \ + Write-Host ('Verifying sha256 ({0}) ...' -f $sha256); \ + if ((Get-FileHash cabal-install.zip -Algorithm sha256).Hash -ne $sha256) { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + \ + Write-Host 'Expanding ...'; \ + Expand-Archive cabal-install.zip -DestinationPath C:\; \ + \ + Write-Host 'Moving ...'; \ + New-Item -Path 'C:\Program Files' -Name 'cabal-install' -ItemType 'directory'; \ + Move-Item -Path 'C:\cabal.exe' -Destination 'C:\Program Files\cabal-install\cabal.exe'; \ + \ + Write-Host 'Removing ...'; \ + Remove-Item cabal-install.zip -Force; \ + \ + Write-Host 'Verifying install ("cabal --version") ...'; \ + cabal --version; \ + \ + Write-Host 'Complete.'; RUN $ghcVersion = '9.0.2'; \ $releaseName = ('ghc-{0}-x86_64-unknown-mingw32' -f $ghcVersion); \ From c47e87459eeba97498c0efd6e27a7fdca2cd43ab Mon Sep 17 00:00:00 2001 From: Alistair Burrowes Date: Sat, 15 Jan 2022 17:38:05 +1100 Subject: [PATCH 05/25] Stack added --- 9.0/windows/windowsservercore-1809/Dockerfile | 37 +++++++++++++++++-- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/9.0/windows/windowsservercore-1809/Dockerfile b/9.0/windows/windowsservercore-1809/Dockerfile index 607e1cb..2f08e4a 100644 --- a/9.0/windows/windowsservercore-1809/Dockerfile +++ b/9.0/windows/windowsservercore-1809/Dockerfile @@ -4,7 +4,7 @@ FROM mcr.microsoft.com/windows/servercore:1809 SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] # PATH isn't actually set in the Docker image, so we have to set it from within the container -RUN $newPath = ('C:\Program Files\ghc\bin;C:\Program Files\cabal-install;{0}' -f $env:PATH); \ +RUN $newPath = ('C:\Program Files\ghc\bin;C:\Program Files\cabal-install;C:\Program Files\stack;{0}' -f $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 @@ -23,11 +23,10 @@ RUN $cabalInstallVersion = '3.6.2.0'; \ }; \ \ Write-Host 'Expanding ...'; \ - Expand-Archive cabal-install.zip -DestinationPath C:\; \ + Expand-Archive cabal-install.zip -DestinationPath C:\cabal-install; \ \ Write-Host 'Moving ...'; \ - New-Item -Path 'C:\Program Files' -Name 'cabal-install' -ItemType 'directory'; \ - Move-Item -Path 'C:\cabal.exe' -Destination 'C:\Program Files\cabal-install\cabal.exe'; \ + Move-Item -Path 'C:\cabal-install' -Destination 'C:\Program Files\cabal-install'; \ \ Write-Host 'Removing ...'; \ Remove-Item cabal-install.zip -Force; \ @@ -65,4 +64,34 @@ RUN $ghcVersion = '9.0.2'; \ \ Write-Host 'Complete.'; +RUN $stackVersion = '2.7.3'; \ + $url = ('https://github.com/commercialhaskell/stack/releases/download/v{0}/stack-{0}-windows-x86_64.zip' -f $stackVersion); \ + Write-Host ('Downloading {0} ...' -f $url); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + Invoke-WebRequest -Uri $url -OutFile 'stack.zip'; \ + \ + $sha256 = '9f8c406f5ffbe72670c9499959ddab76fa8a378b4f25e3b82700c16c7fd2bad6'; \ + Write-Host ('Verifying sha256 ({0}) ...' -f $sha256); \ + if ((Get-FileHash stack.zip -Algorithm sha256).Hash -ne $sha256) { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + \ + Write-Host 'Expanding ...'; \ + Expand-Archive stack.zip -DestinationPath C:\stack; \ + \ + Write-Host 'Moving ...'; \ + # Manually create the directory and just copy the exe, we don't want the docs + New-Item -Path 'C:\Program Files' -Name 'stack' -ItemType 'directory'; \ + Move-Item -Path 'C:\stack\stack.exe' -Destination 'C:\Program Files\stack\stack.exe'; \ + \ + Write-Host 'Removing ...'; \ + Remove-Item stack.zip -Force; \ + Remove-Item -Path 'C:\stack' -Recurse -Force; \ + \ + Write-Host 'Verifying install ("stack --version") ...'; \ + stack --version; \ + \ + Write-Host 'Complete.'; + CMD ["ghci"] \ No newline at end of file From 383544e0fdb115ff9e8f05e1ef3617b8739f0d24 Mon Sep 17 00:00:00 2001 From: Alistair Burrowes Date: Sat, 15 Jan 2022 17:41:26 +1100 Subject: [PATCH 06/25] Ignore consecutive runs for now --- .hadolint.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.hadolint.yaml b/.hadolint.yaml index d99f5a0..64fc44f 100644 --- a/.hadolint.yaml +++ b/.hadolint.yaml @@ -9,3 +9,6 @@ ignored: # https://github.com/hadolint/hadolint/wiki/DL4006 # The set -eux; pattern is common in many of the official images. It likely is a better approach here. - DL4006 + # https://github.com/hadolint/hadolint/wiki/DL3059 + # In windows the ARG style does not seem popular, so consecutive runs are ok + - DL3059 \ No newline at end of file From 4f71ef151f0f859d70c239548d549a8ffd4bcf41 Mon Sep 17 00:00:00 2001 From: Alistair Burrowes Date: Sat, 15 Jan 2022 17:43:51 +1100 Subject: [PATCH 07/25] Fix actions --- .github/workflows/windows.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index d229c62..e2d47f5 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -22,10 +22,11 @@ jobs: - ghc: '9.0.2' ghc_minor: '9.0' steps: - run: | - docker build --pull \ - -t haskell:${{ matrix.ghc }}-windowsservercore-${{ matrix.os_version }} \ - ${{ matrix.ghc_minor }}/windowsservercore-${{ matrix.os_version }} + - name: build + smoke test [${{ matrix.ghc }}] + run: | + docker build --pull \ + -t haskell:${{ matrix.ghc }}-windowsservercore-${{ matrix.os_version }} \ + ${{ matrix.ghc_minor }}/windowsservercore-${{ matrix.os_version }} # - uses: actions/checkout@v2 # with: # repository: AlistairB/official-images From d7ad9b5fe5b97b2b3990ef9945ffab523ba98a46 Mon Sep 17 00:00:00 2001 From: Alistair Burrowes Date: Sat, 15 Jan 2022 17:45:19 +1100 Subject: [PATCH 08/25] Fix actions --- .github/workflows/windows.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index e2d47f5..3ba540f 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -24,8 +24,8 @@ jobs: steps: - name: build + smoke test [${{ matrix.ghc }}] run: | - docker build --pull \ - -t haskell:${{ matrix.ghc }}-windowsservercore-${{ matrix.os_version }} \ + docker build --pull ^ + -t haskell:${{ matrix.ghc }}-windowsservercore-${{ matrix.os_version }} ^ ${{ matrix.ghc_minor }}/windowsservercore-${{ matrix.os_version }} # - uses: actions/checkout@v2 # with: From edae96a8d48badeb4561bcf24c4252232f2a42f1 Mon Sep 17 00:00:00 2001 From: Alistair Burrowes Date: Sun, 16 Jan 2022 09:52:55 +1100 Subject: [PATCH 09/25] Add git, more clean up --- .github/workflows/windows.yml | 4 +- .hadolint.yaml | 5 +- 9.0/windows/windowsservercore-1809/Dockerfile | 108 ++++++++++++------ 3 files changed, 75 insertions(+), 42 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 3ba540f..ea6dd5a 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -24,9 +24,7 @@ jobs: steps: - name: build + smoke test [${{ matrix.ghc }}] run: | - docker build --pull ^ - -t haskell:${{ matrix.ghc }}-windowsservercore-${{ matrix.os_version }} ^ - ${{ matrix.ghc_minor }}/windowsservercore-${{ matrix.os_version }} + docker build --pull -t haskell:${{ matrix.ghc }}-windowsservercore-${{ matrix.os_version }} ${{ matrix.ghc_minor }}/windowsservercore-${{ matrix.os_version }} # - uses: actions/checkout@v2 # with: # repository: AlistairB/official-images diff --git a/.hadolint.yaml b/.hadolint.yaml index 64fc44f..b04f70d 100644 --- a/.hadolint.yaml +++ b/.hadolint.yaml @@ -8,7 +8,4 @@ ignored: - DL3003 # https://github.com/hadolint/hadolint/wiki/DL4006 # The set -eux; pattern is common in many of the official images. It likely is a better approach here. - - DL4006 - # https://github.com/hadolint/hadolint/wiki/DL3059 - # In windows the ARG style does not seem popular, so consecutive runs are ok - - DL3059 \ No newline at end of file + - DL4006 \ No newline at end of file diff --git a/9.0/windows/windowsservercore-1809/Dockerfile b/9.0/windows/windowsservercore-1809/Dockerfile index 2f08e4a..e3ec3aa 100644 --- a/9.0/windows/windowsservercore-1809/Dockerfile +++ b/9.0/windows/windowsservercore-1809/Dockerfile @@ -3,21 +3,56 @@ FROM mcr.microsoft.com/windows/servercore:1809 # $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] +# Install MinGit (cabal + stack can have git dependencies) +# Pinned so we can sha256 verify, but this should only be bumped when something else is being bumped. +# 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." +ARG GIT_VERSION=2.23.0 +ARG GIT_DOWNLOAD_SHA256=8f65208f92c0b4c3ae4c0cf02d4b5f6791d539cd1a07b2df62b7116467724735 +# steps inspired by "chcolateyInstall.ps1" from "git.install" (https://chocolatey.org/packages/git.install) +RUN $url = ('https://github.com/git-for-windows/git/releases/download/v{0}.windows.1/MinGit-{0}-64-bit.zip' -f $env:GIT_VERSION); \ + Write-Host ('Downloading {0} ...' -f $url); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + Invoke-WebRequest -Uri $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 ("git version") ...'; \ + git version; \ + \ + Write-Host 'Complete.'; + # PATH isn't actually set in the Docker image, so we have to set it from within the container RUN $newPath = ('C:\Program Files\ghc\bin;C:\Program Files\cabal-install;C:\Program Files\stack;{0}' -f $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 -RUN $cabalInstallVersion = '3.6.2.0'; \ - $url = ('https://downloads.haskell.org/~cabal/cabal-install-{0}/cabal-install-{0}-x86_64-windows.zip' -f $cabalInstallVersion); \ +ARG CABAL_INSTALL_VERSION=3.6.2.0 +ARG CABAL_INSTALL_SHA256=89aa3aa3f76d15182c0d03227639890cd537627ba0bf0ef9ab451fee504b24c6 + +RUN $url = ('https://downloads.haskell.org/~cabal/cabal-install-{0}/cabal-install-{0}-x86_64-windows.zip' -f $env:CABAL_INSTALL_VERSION); \ Write-Host ('Downloading {0} ...' -f $url); \ [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ Invoke-WebRequest -Uri $url -OutFile 'cabal-install.zip'; \ \ - $sha256 = '89aa3aa3f76d15182c0d03227639890cd537627ba0bf0ef9ab451fee504b24c6'; \ - Write-Host ('Verifying sha256 ({0}) ...' -f $sha256); \ - if ((Get-FileHash cabal-install.zip -Algorithm sha256).Hash -ne $sha256) { \ + Write-Host ('Verifying sha256 ({0}) ...' -f $env:CABAL_INSTALL_SHA256); \ + if ((Get-FileHash cabal-install.zip -Algorithm sha256).Hash -ne $env:CABAL_INSTALL_SHA256) { \ Write-Host 'FAILED!'; \ exit 1; \ }; \ @@ -36,62 +71,65 @@ RUN $cabalInstallVersion = '3.6.2.0'; \ \ Write-Host 'Complete.'; -RUN $ghcVersion = '9.0.2'; \ - $releaseName = ('ghc-{0}-x86_64-unknown-mingw32' -f $ghcVersion); \ - $url = ('https://downloads.haskell.org/~ghc/{0}/{1}.zip' -f $ghcVersion, $releaseName); \ +ARG STACK_VERSION=2.7.3 +ARG STACK_SHA256=9f8c406f5ffbe72670c9499959ddab76fa8a378b4f25e3b82700c16c7fd2bad6 + +RUN $url = ('https://github.com/commercialhaskell/stack/releases/download/v{0}/stack-{0}-windows-x86_64.zip' -f $env:STACK_VERSION); \ Write-Host ('Downloading {0} ...' -f $url); \ [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ - Invoke-WebRequest -Uri $url -OutFile 'ghc.zip'; \ + Invoke-WebRequest -Uri $url -OutFile 'stack.zip'; \ \ - $sha256 = 'ddd22abb7e6731506320585bffa11a4182fd6b4f9751111a588409568fd95d9f'; \ - Write-Host ('Verifying sha256 ({0}) ...' -f $sha256); \ - if ((Get-FileHash ghc.zip -Algorithm sha256).Hash -ne $sha256) { \ + Write-Host ('Verifying sha256 ({0}) ...' -f $env:STACK_SHA256); \ + if ((Get-FileHash stack.zip -Algorithm sha256).Hash -ne $env:STACK_SHA256) { \ Write-Host 'FAILED!'; \ exit 1; \ }; \ \ Write-Host 'Expanding ...'; \ - Expand-Archive ghc.zip -DestinationPath C:\; \ + Expand-Archive stack.zip -DestinationPath C:\stack; \ \ Write-Host 'Moving ...'; \ - Move-Item -Path ('C:\{0}' -f $releaseName) -Destination 'C:\Program Files\ghc'; \ + # Manually create the directory and just copy the exe, we don't want the docs + New-Item -Path 'C:\Program Files' -Name 'stack' -ItemType 'directory'; \ + Move-Item -Path 'C:\stack\stack.exe' -Destination 'C:\Program Files\stack\stack.exe'; \ \ Write-Host 'Removing ...'; \ - Remove-Item ghc.zip -Force; \ - \ - Write-Host 'Verifying install ("ghc --version") ...'; \ - ghc --version; \ + Remove-Item stack.zip -Force; \ + Remove-Item -Path 'C:\stack' -Recurse -Force; \ + \ + Write-Host 'Verifying install ("stack --version") ...'; \ + stack --version; \ \ - Write-Host 'Complete.'; + Write-Host 'Complete.'; -RUN $stackVersion = '2.7.3'; \ - $url = ('https://github.com/commercialhaskell/stack/releases/download/v{0}/stack-{0}-windows-x86_64.zip' -f $stackVersion); \ +ARG GHC_VERSION=9.0.2 +ARG GHC_SHA256=ddd22abb7e6731506320585bffa11a4182fd6b4f9751111a588409568fd95d9f + +RUN $releaseName = ('ghc-{0}-x86_64-unknown-mingw32' -f $env:GHC_VERSION); \ + $url = ('https://downloads.haskell.org/~ghc/{0}/{1}.zip' -f $env:GHC_VERSION, $releaseName); \ Write-Host ('Downloading {0} ...' -f $url); \ [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ - Invoke-WebRequest -Uri $url -OutFile 'stack.zip'; \ + Invoke-WebRequest -Uri $url -OutFile 'ghc.zip'; \ \ - $sha256 = '9f8c406f5ffbe72670c9499959ddab76fa8a378b4f25e3b82700c16c7fd2bad6'; \ - Write-Host ('Verifying sha256 ({0}) ...' -f $sha256); \ - if ((Get-FileHash stack.zip -Algorithm sha256).Hash -ne $sha256) { \ + $sha256 = 'ddd22abb7e6731506320585bffa11a4182fd6b4f9751111a588409568fd95d9f'; \ + Write-Host ('Verifying sha256 ({0}) ...' -f $env:GHC_SHA256); \ + if ((Get-FileHash ghc.zip -Algorithm sha256).Hash -ne $env:GHC_SHA256) { \ Write-Host 'FAILED!'; \ exit 1; \ }; \ \ Write-Host 'Expanding ...'; \ - Expand-Archive stack.zip -DestinationPath C:\stack; \ + Expand-Archive ghc.zip -DestinationPath C:\; \ \ Write-Host 'Moving ...'; \ - # Manually create the directory and just copy the exe, we don't want the docs - New-Item -Path 'C:\Program Files' -Name 'stack' -ItemType 'directory'; \ - Move-Item -Path 'C:\stack\stack.exe' -Destination 'C:\Program Files\stack\stack.exe'; \ + Move-Item -Path ('C:\{0}' -f $releaseName) -Destination 'C:\Program Files\ghc'; \ \ Write-Host 'Removing ...'; \ - Remove-Item stack.zip -Force; \ - Remove-Item -Path 'C:\stack' -Recurse -Force; \ - \ - Write-Host 'Verifying install ("stack --version") ...'; \ - stack --version; \ + Remove-Item ghc.zip -Force; \ \ - Write-Host 'Complete.'; + Write-Host 'Verifying install ("ghc --version") ...'; \ + ghc --version; \ + \ + Write-Host 'Complete.'; CMD ["ghci"] \ No newline at end of file From aba32e04b42e17cf7c5737843a99e3666ed15520 Mon Sep 17 00:00:00 2001 From: Alistair Burrowes Date: Sun, 16 Jan 2022 10:10:30 +1100 Subject: [PATCH 10/25] stack configure --- .github/workflows/windows.yml | 4 +++- 9.0/windows/windowsservercore-1809/Dockerfile | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index ea6dd5a..7c9bc54 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -24,7 +24,9 @@ jobs: steps: - name: build + smoke test [${{ matrix.ghc }}] run: | - docker build --pull -t haskell:${{ matrix.ghc }}-windowsservercore-${{ matrix.os_version }} ${{ matrix.ghc_minor }}/windowsservercore-${{ matrix.os_version }} + docker build --pull ^ + -t haskell:${{ matrix.ghc }}-windowsservercore-${{ matrix.os_version }} ^ + ${{ matrix.ghc_minor }}/windows/windowsservercore-${{ matrix.os_version }} # - uses: actions/checkout@v2 # with: # repository: AlistairB/official-images diff --git a/9.0/windows/windowsservercore-1809/Dockerfile b/9.0/windows/windowsservercore-1809/Dockerfile index e3ec3aa..a2de6ef 100644 --- a/9.0/windows/windowsservercore-1809/Dockerfile +++ b/9.0/windows/windowsservercore-1809/Dockerfile @@ -97,6 +97,10 @@ RUN $url = ('https://github.com/commercialhaskell/stack/releases/download/v{0}/s Remove-Item stack.zip -Force; \ Remove-Item -Path 'C:\stack' -Recurse -Force; \ \ + Write-Host 'Configure ...'; \ + stack config set system-ghc --global true; \ + stack config set install-ghc --global false; \ + \ Write-Host 'Verifying install ("stack --version") ...'; \ stack --version; \ \ From 3022b137863c3f305e32593ff72d3c484d5010e6 Mon Sep 17 00:00:00 2001 From: Alistair Burrowes Date: Sun, 16 Jan 2022 11:04:42 +1100 Subject: [PATCH 11/25] Playing with msys2. It break docker. --- 9.0/windows/windowsservercore-1809/Dockerfile | 37 +++++++++++++++++-- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/9.0/windows/windowsservercore-1809/Dockerfile b/9.0/windows/windowsservercore-1809/Dockerfile index a2de6ef..891425a 100644 --- a/9.0/windows/windowsservercore-1809/Dockerfile +++ b/9.0/windows/windowsservercore-1809/Dockerfile @@ -37,6 +37,37 @@ RUN $url = ('https://github.com/git-for-windows/git/releases/download/v{0}.windo \ Write-Host 'Complete.'; +# The install hangs in docker https://github.com/msys2/MSYS2-packages/issues/2305 .. will need to find a solution +# ARG MSYS2_VERSION=2021-11-30 +# ARG MSYS2_SHA256=971f247546d1c7f92e711650136004a4f54119ce3131fe558112e24d69d0d352 + +# RUN $collapsedVersion = $env:MSYS2_VERSION -replace '-','';\ +# $url = ('https://github.com/msys2/msys2-installer/releases/download/{0}/msys2-base-x86_64-{1}.sfx.exe' -f $env:MSYS2_VERSION, $collapsedVersion); \ +# Write-Host ('Downloading {0} ...' -f $url); \ +# [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ +# Invoke-WebRequest -Uri $url -OutFile 'msys2.exe'; \ +# \ +# Write-Host ('Verifying sha256 ({0}) ...' -f $env:MSYS2_SHA256); \ +# if ((Get-FileHash msys2.exe -Algorithm sha256).Hash -ne $env:MSYS2_SHA256) { \ +# Write-Host 'FAILED!'; \ +# exit 1; \ +# }; \ +# \ +# Write-Host 'Installing ...'; \ +# .\msys2.exe -y -oC:\; \ +# \ +# Write-Host 'Removing ...'; \ +# Remove-Item msys2.exe -Force; \ +# \ +# Write-Host 'Configure + Verify...'; \ +# function msys() { C:\msys64\usr\bin\bash.exe @('-lc') + @Args; } \ +# msys ' '; \ +# msys 'pacman --noconfirm -Syuu'; \ +# msys 'pacman --noconfirm -Syuu'; \ +# msys 'pacman --noconfirm -Scc'; \ +# \ +# Write-Host 'Complete.'; + # PATH isn't actually set in the Docker image, so we have to set it from within the container RUN $newPath = ('C:\Program Files\ghc\bin;C:\Program Files\cabal-install;C:\Program Files\stack;{0}' -f $env:PATH); \ Write-Host ('Updating PATH: {0}' -f $newPath); \ @@ -69,7 +100,7 @@ RUN $url = ('https://downloads.haskell.org/~cabal/cabal-install-{0}/cabal-instal Write-Host 'Verifying install ("cabal --version") ...'; \ cabal --version; \ \ - Write-Host 'Complete.'; + Write-Host 'Complete.'; ARG STACK_VERSION=2.7.3 ARG STACK_SHA256=9f8c406f5ffbe72670c9499959ddab76fa8a378b4f25e3b82700c16c7fd2bad6 @@ -100,11 +131,11 @@ RUN $url = ('https://github.com/commercialhaskell/stack/releases/download/v{0}/s Write-Host 'Configure ...'; \ stack config set system-ghc --global true; \ stack config set install-ghc --global false; \ - \ + \ Write-Host 'Verifying install ("stack --version") ...'; \ stack --version; \ \ - Write-Host 'Complete.'; + Write-Host 'Complete.'; ARG GHC_VERSION=9.0.2 ARG GHC_SHA256=ddd22abb7e6731506320585bffa11a4182fd6b4f9751111a588409568fd95d9f From 05e4626615f8c8cfe241993836f12c13ad71df86 Mon Sep 17 00:00:00 2001 From: Alistair Burrowes Date: Sun, 16 Jan 2022 11:25:49 +1100 Subject: [PATCH 12/25] Ok nightly msys2 installs --- 9.0/windows/windowsservercore-1809/Dockerfile | 60 ++++++++++--------- 1 file changed, 31 insertions(+), 29 deletions(-) diff --git a/9.0/windows/windowsservercore-1809/Dockerfile b/9.0/windows/windowsservercore-1809/Dockerfile index 891425a..7383f09 100644 --- a/9.0/windows/windowsservercore-1809/Dockerfile +++ b/9.0/windows/windowsservercore-1809/Dockerfile @@ -37,36 +37,38 @@ RUN $url = ('https://github.com/git-for-windows/git/releases/download/v{0}.windo \ Write-Host 'Complete.'; -# The install hangs in docker https://github.com/msys2/MSYS2-packages/issues/2305 .. will need to find a solution -# ARG MSYS2_VERSION=2021-11-30 -# ARG MSYS2_SHA256=971f247546d1c7f92e711650136004a4f54119ce3131fe558112e24d69d0d352 +# The latest release hangs docker https://github.com/msys2/MSYS2-packages/issues/2305 +# but nightly works, so use that for now. +ARG MSYS2_VERSION=2021-11-30 +ARG MSYS2_SHA256=61a0514eb41f2c7199874eabc7db0abf3250d5daf4c8867c6c699cb52dcb8440 -# RUN $collapsedVersion = $env:MSYS2_VERSION -replace '-','';\ -# $url = ('https://github.com/msys2/msys2-installer/releases/download/{0}/msys2-base-x86_64-{1}.sfx.exe' -f $env:MSYS2_VERSION, $collapsedVersion); \ -# Write-Host ('Downloading {0} ...' -f $url); \ -# [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ -# Invoke-WebRequest -Uri $url -OutFile 'msys2.exe'; \ -# \ -# Write-Host ('Verifying sha256 ({0}) ...' -f $env:MSYS2_SHA256); \ -# if ((Get-FileHash msys2.exe -Algorithm sha256).Hash -ne $env:MSYS2_SHA256) { \ -# Write-Host 'FAILED!'; \ -# exit 1; \ -# }; \ -# \ -# Write-Host 'Installing ...'; \ -# .\msys2.exe -y -oC:\; \ -# \ -# Write-Host 'Removing ...'; \ -# Remove-Item msys2.exe -Force; \ -# \ -# Write-Host 'Configure + Verify...'; \ -# function msys() { C:\msys64\usr\bin\bash.exe @('-lc') + @Args; } \ -# msys ' '; \ -# msys 'pacman --noconfirm -Syuu'; \ -# msys 'pacman --noconfirm -Syuu'; \ -# msys 'pacman --noconfirm -Scc'; \ -# \ -# Write-Host 'Complete.'; +RUN $collapsedVersion = $env:MSYS2_VERSION -replace '-','';\ + # $url = ('https://github.com/msys2/msys2-installer/releases/download/{0}/msys2-base-x86_64-{1}.sfx.exe' -f $env:MSYS2_VERSION, $collapsedVersion); \ + $url = 'https://github.com/msys2/msys2-installer/releases/download/nightly-x86_64/msys2-base-x86_64-latest.sfx.exe'; \ + Write-Host ('Downloading {0} ...' -f $url); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + Invoke-WebRequest -Uri $url -OutFile 'msys2.exe'; \ + \ + Write-Host ('Verifying sha256 ({0}) ...' -f $env:MSYS2_SHA256); \ + if ((Get-FileHash msys2.exe -Algorithm sha256).Hash -ne $env:MSYS2_SHA256) { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + \ + Write-Host 'Installing ...'; \ + .\msys2.exe -y -oC:\; \ + \ + Write-Host 'Removing ...'; \ + Remove-Item msys2.exe -Force; \ + \ + Write-Host 'Configure + Verify...'; \ + function msys() { C:\msys64\usr\bin\bash.exe @('-lc') + @Args; } \ + msys ' '; \ + msys 'pacman --noconfirm -Syuu'; \ + msys 'pacman --noconfirm -Syuu'; \ + msys 'pacman --noconfirm -Scc'; \ + \ + Write-Host 'Complete.'; # PATH isn't actually set in the Docker image, so we have to set it from within the container RUN $newPath = ('C:\Program Files\ghc\bin;C:\Program Files\cabal-install;C:\Program Files\stack;{0}' -f $env:PATH); \ From 6b250047d6388897f6f38a2dfd507a4e202934c4 Mon Sep 17 00:00:00 2001 From: Alistair Burrowes Date: Sun, 16 Jan 2022 12:44:26 +1100 Subject: [PATCH 13/25] Don't install msys2 for now. Need to figure out the right solution --- .github/workflows/windows.yml | 4 +- 9.0/windows/windowsservercore-1809/Dockerfile | 66 +++++++++++-------- 2 files changed, 38 insertions(+), 32 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 7c9bc54..c1791c9 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -24,9 +24,7 @@ jobs: steps: - name: build + smoke test [${{ matrix.ghc }}] run: | - docker build --pull ^ - -t haskell:${{ matrix.ghc }}-windowsservercore-${{ matrix.os_version }} ^ - ${{ matrix.ghc_minor }}/windows/windowsservercore-${{ matrix.os_version }} + docker build --pull -t haskell:${{ matrix.ghc }}-windowsservercore-${{ matrix.os_version }} ${{ matrix.ghc_minor }}\windows\windowsservercore-${{ matrix.os_version }} # - uses: actions/checkout@v2 # with: # repository: AlistairB/official-images diff --git a/9.0/windows/windowsservercore-1809/Dockerfile b/9.0/windows/windowsservercore-1809/Dockerfile index 7383f09..2621aae 100644 --- a/9.0/windows/windowsservercore-1809/Dockerfile +++ b/9.0/windows/windowsservercore-1809/Dockerfile @@ -39,36 +39,44 @@ RUN $url = ('https://github.com/git-for-windows/git/releases/download/v{0}.windo # The latest release hangs docker https://github.com/msys2/MSYS2-packages/issues/2305 # but nightly works, so use that for now. -ARG MSYS2_VERSION=2021-11-30 -ARG MSYS2_SHA256=61a0514eb41f2c7199874eabc7db0abf3250d5daf4c8867c6c699cb52dcb8440 +# ARG MSYS2_VERSION=2021-11-30 +# ARG MSYS2_SHA256=61a0514eb41f2c7199874eabc7db0abf3250d5daf4c8867c6c699cb52dcb8440 -RUN $collapsedVersion = $env:MSYS2_VERSION -replace '-','';\ - # $url = ('https://github.com/msys2/msys2-installer/releases/download/{0}/msys2-base-x86_64-{1}.sfx.exe' -f $env:MSYS2_VERSION, $collapsedVersion); \ - $url = 'https://github.com/msys2/msys2-installer/releases/download/nightly-x86_64/msys2-base-x86_64-latest.sfx.exe'; \ - Write-Host ('Downloading {0} ...' -f $url); \ - [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ - Invoke-WebRequest -Uri $url -OutFile 'msys2.exe'; \ - \ - Write-Host ('Verifying sha256 ({0}) ...' -f $env:MSYS2_SHA256); \ - if ((Get-FileHash msys2.exe -Algorithm sha256).Hash -ne $env:MSYS2_SHA256) { \ - Write-Host 'FAILED!'; \ - exit 1; \ - }; \ - \ - Write-Host 'Installing ...'; \ - .\msys2.exe -y -oC:\; \ - \ - Write-Host 'Removing ...'; \ - Remove-Item msys2.exe -Force; \ - \ - Write-Host 'Configure + Verify...'; \ - function msys() { C:\msys64\usr\bin\bash.exe @('-lc') + @Args; } \ - msys ' '; \ - msys 'pacman --noconfirm -Syuu'; \ - msys 'pacman --noconfirm -Syuu'; \ - msys 'pacman --noconfirm -Scc'; \ - \ - Write-Host 'Complete.'; +# RUN $collapsedVersion = $env:MSYS2_VERSION -replace '-','';\ +# # $url = ('https://github.com/msys2/msys2-installer/releases/download/{0}/msys2-base-x86_64-{1}.sfx.exe' -f $env:MSYS2_VERSION, $collapsedVersion); \ +# $url = 'https://github.com/msys2/msys2-installer/releases/download/nightly-x86_64/msys2-base-x86_64-latest.sfx.exe'; \ +# Write-Host ('Downloading {0} ...' -f $url); \ +# [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ +# Invoke-WebRequest -Uri $url -OutFile 'msys2.exe'; \ +# \ +# Write-Host ('Verifying sha256 ({0}) ...' -f $env:MSYS2_SHA256); \ +# if ((Get-FileHash msys2.exe -Algorithm sha256).Hash -ne $env:MSYS2_SHA256) { \ +# Write-Host 'FAILED!'; \ +# exit 1; \ +# }; \ +# \ +# Write-Host 'Installing ...'; \ +# .\msys2.exe -y -oC:\; \ +# \ +# Write-Host 'Removing ...'; \ +# Remove-Item msys2.exe -Force; \ +# \ +# Write-Host 'Configure + Verify...'; \ +# function msys() { C:\msys64\usr\bin\bash.exe @('-lc') + @Args; } \ +# msys ' '; \ +# # Upgrading full system... +# msys 'pacman --noconfirm -Syuu'; \ +# # Upgrading full system twice... +# msys 'pacman --noconfirm -Syuu'; \ +# # Installing Haskell Dependencies... +# msys 'pacman --noconfirm -S --needed curl autoconf mingw-w64-x86_64-pkgconf'; \ +# # Updating SSL root certificate authorities... +# msys 'pacman --noconfirm -S ca-certificates'; \ +# # Clean up the cache... +# msys 'pacman --noconfirm -Scc'; \ +# \ +# Write-Host 'Complete.'; +# https://gitlab.haskell.org/haskell/ghcup-hs/-/blob/master/scripts/bootstrap/bootstrap-haskell.ps1#L428-435 ? # PATH isn't actually set in the Docker image, so we have to set it from within the container RUN $newPath = ('C:\Program Files\ghc\bin;C:\Program Files\cabal-install;C:\Program Files\stack;{0}' -f $env:PATH); \ From 91d77c000d8157cc41689bb7032c73f41da67174 Mon Sep 17 00:00:00 2001 From: Alistair Burrowes Date: Sun, 14 Aug 2022 13:36:17 +1000 Subject: [PATCH 14/25] Bump things and see where this is at --- 9.0/windows/windowsservercore-1809/Dockerfile | 85 +++++++++---------- 1 file changed, 42 insertions(+), 43 deletions(-) diff --git a/9.0/windows/windowsservercore-1809/Dockerfile b/9.0/windows/windowsservercore-1809/Dockerfile index 2621aae..a48319a 100644 --- a/9.0/windows/windowsservercore-1809/Dockerfile +++ b/9.0/windows/windowsservercore-1809/Dockerfile @@ -37,45 +37,44 @@ RUN $url = ('https://github.com/git-for-windows/git/releases/download/v{0}.windo \ Write-Host 'Complete.'; -# The latest release hangs docker https://github.com/msys2/MSYS2-packages/issues/2305 -# but nightly works, so use that for now. -# ARG MSYS2_VERSION=2021-11-30 -# ARG MSYS2_SHA256=61a0514eb41f2c7199874eabc7db0abf3250d5daf4c8867c6c699cb52dcb8440 +# Try this +ARG MSYS2_VERSION=2022-06-03 +ARG MSYS2_SHA256=0694bf6661aa9dae8338be87b633ae9ac20c68d593cc17658a1dffe6291098bf -# RUN $collapsedVersion = $env:MSYS2_VERSION -replace '-','';\ -# # $url = ('https://github.com/msys2/msys2-installer/releases/download/{0}/msys2-base-x86_64-{1}.sfx.exe' -f $env:MSYS2_VERSION, $collapsedVersion); \ -# $url = 'https://github.com/msys2/msys2-installer/releases/download/nightly-x86_64/msys2-base-x86_64-latest.sfx.exe'; \ -# Write-Host ('Downloading {0} ...' -f $url); \ -# [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ -# Invoke-WebRequest -Uri $url -OutFile 'msys2.exe'; \ -# \ -# Write-Host ('Verifying sha256 ({0}) ...' -f $env:MSYS2_SHA256); \ -# if ((Get-FileHash msys2.exe -Algorithm sha256).Hash -ne $env:MSYS2_SHA256) { \ -# Write-Host 'FAILED!'; \ -# exit 1; \ -# }; \ -# \ -# Write-Host 'Installing ...'; \ -# .\msys2.exe -y -oC:\; \ -# \ -# Write-Host 'Removing ...'; \ -# Remove-Item msys2.exe -Force; \ -# \ -# Write-Host 'Configure + Verify...'; \ -# function msys() { C:\msys64\usr\bin\bash.exe @('-lc') + @Args; } \ -# msys ' '; \ -# # Upgrading full system... -# msys 'pacman --noconfirm -Syuu'; \ -# # Upgrading full system twice... -# msys 'pacman --noconfirm -Syuu'; \ -# # Installing Haskell Dependencies... -# msys 'pacman --noconfirm -S --needed curl autoconf mingw-w64-x86_64-pkgconf'; \ -# # Updating SSL root certificate authorities... -# msys 'pacman --noconfirm -S ca-certificates'; \ -# # Clean up the cache... -# msys 'pacman --noconfirm -Scc'; \ -# \ -# Write-Host 'Complete.'; +RUN $collapsedVersion = $env:MSYS2_VERSION -replace '-','';\ + # $url = ('https://github.com/msys2/msys2-installer/releases/download/{0}/msys2-base-x86_64-{1}.sfx.exe' -f $env:MSYS2_VERSION, $collapsedVersion); \ + $url = 'https://github.com/msys2/msys2-installer/releases/download/nightly-x86_64/msys2-base-x86_64-latest.sfx.exe'; \ + Write-Host ('Downloading {0} ...' -f $url); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + Invoke-WebRequest -Uri $url -OutFile 'msys2.exe'; \ + \ + Write-Host ('Verifying sha256 ({0}) ...' -f $env:MSYS2_SHA256); \ + if ((Get-FileHash msys2.exe -Algorithm sha256).Hash -ne $env:MSYS2_SHA256) { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + \ + Write-Host 'Installing ...'; \ + .\msys2.exe -y -oC:\; \ + \ + Write-Host 'Removing ...'; \ + Remove-Item msys2.exe -Force; \ + \ + Write-Host 'Configure + Verify...'; \ + function msys() { C:\msys64\usr\bin\bash.exe @('-lc') + @Args; } \ + msys ' '; \ + # Upgrading full system... + msys 'pacman --noconfirm -Syuu'; \ + # Upgrading full system twice... + msys 'pacman --noconfirm -Syuu'; \ + # Installing Haskell Dependencies... + msys 'pacman --noconfirm -S --needed curl autoconf mingw-w64-x86_64-pkgconf'; \ + # Updating SSL root certificate authorities... + msys 'pacman --noconfirm -S ca-certificates'; \ + # Clean up the cache... + msys 'pacman --noconfirm -Scc'; \ + \ + Write-Host 'Complete.'; # https://gitlab.haskell.org/haskell/ghcup-hs/-/blob/master/scripts/bootstrap/bootstrap-haskell.ps1#L428-435 ? # PATH isn't actually set in the Docker image, so we have to set it from within the container @@ -84,8 +83,8 @@ RUN $newPath = ('C:\Program Files\ghc\bin;C:\Program Files\cabal-install;C:\Prog [Environment]::SetEnvironmentVariable('PATH', $newPath, [EnvironmentVariableTarget]::Machine); # doing this first to share cache across versions more aggressively -ARG CABAL_INSTALL_VERSION=3.6.2.0 -ARG CABAL_INSTALL_SHA256=89aa3aa3f76d15182c0d03227639890cd537627ba0bf0ef9ab451fee504b24c6 +ARG CABAL_INSTALL_VERSION=3.8.1.0 +ARG CABAL_INSTALL_SHA256=b6dd6afe0e5a883f84dc52d836af0e90d9cd2b2978dd87200332085ecb4a0315 RUN $url = ('https://downloads.haskell.org/~cabal/cabal-install-{0}/cabal-install-{0}-x86_64-windows.zip' -f $env:CABAL_INSTALL_VERSION); \ Write-Host ('Downloading {0} ...' -f $url); \ @@ -112,8 +111,8 @@ RUN $url = ('https://downloads.haskell.org/~cabal/cabal-install-{0}/cabal-instal \ Write-Host 'Complete.'; -ARG STACK_VERSION=2.7.3 -ARG STACK_SHA256=9f8c406f5ffbe72670c9499959ddab76fa8a378b4f25e3b82700c16c7fd2bad6 +ARG STACK_VERSION=2.7.5 +ARG STACK_SHA256=a77a1b27501d78800baa7e88d8ccca1d6e9b19b9c59f02f2a40ca260aaa75260 RUN $url = ('https://github.com/commercialhaskell/stack/releases/download/v{0}/stack-{0}-windows-x86_64.zip' -f $env:STACK_VERSION); \ Write-Host ('Downloading {0} ...' -f $url); \ @@ -177,4 +176,4 @@ RUN $releaseName = ('ghc-{0}-x86_64-unknown-mingw32' -f $env:GHC_VERSION); \ \ Write-Host 'Complete.'; -CMD ["ghci"] \ No newline at end of file +CMD ["ghci"] From 348a8a036d2a9c0c08e8b7625184751b749c6ab8 Mon Sep 17 00:00:00 2001 From: Alistair Burrowes Date: Sun, 14 Aug 2022 13:40:01 +1000 Subject: [PATCH 15/25] Try this --- .github/workflows/windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index c1791c9..73c8f54 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -24,7 +24,7 @@ jobs: steps: - name: build + smoke test [${{ matrix.ghc }}] run: | - docker build --pull -t haskell:${{ matrix.ghc }}-windowsservercore-${{ matrix.os_version }} ${{ matrix.ghc_minor }}\windows\windowsservercore-${{ matrix.os_version }} + docker build --pull -t haskell:${{ matrix.ghc }}-windowsservercore-${{ matrix.os_version }} ${{ matrix.ghc_minor }}\\windows\\windowsservercore-${{ matrix.os_version }} # - uses: actions/checkout@v2 # with: # repository: AlistairB/official-images From c1623c1c0063bacf213db587d87c3e3016585ca8 Mon Sep 17 00:00:00 2001 From: Alistair Burrowes Date: Sun, 14 Aug 2022 13:40:57 +1000 Subject: [PATCH 16/25] forward slash? --- .github/workflows/windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 73c8f54..c62824b 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -24,7 +24,7 @@ jobs: steps: - name: build + smoke test [${{ matrix.ghc }}] run: | - docker build --pull -t haskell:${{ matrix.ghc }}-windowsservercore-${{ matrix.os_version }} ${{ matrix.ghc_minor }}\\windows\\windowsservercore-${{ matrix.os_version }} + docker build --pull -t haskell:${{ matrix.ghc }}-windowsservercore-${{ matrix.os_version }} ${{ matrix.ghc_minor }}/windows/windowsservercore-${{ matrix.os_version }} # - uses: actions/checkout@v2 # with: # repository: AlistairB/official-images From 244a45392f9adca406b0082be8f087d052d08d24 Mon Sep 17 00:00:00 2001 From: Alistair Burrowes Date: Sun, 14 Aug 2022 13:42:26 +1000 Subject: [PATCH 17/25] wat --- .github/workflows/windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index c62824b..c1791c9 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -24,7 +24,7 @@ jobs: steps: - name: build + smoke test [${{ matrix.ghc }}] run: | - docker build --pull -t haskell:${{ matrix.ghc }}-windowsservercore-${{ matrix.os_version }} ${{ matrix.ghc_minor }}/windows/windowsservercore-${{ matrix.os_version }} + docker build --pull -t haskell:${{ matrix.ghc }}-windowsservercore-${{ matrix.os_version }} ${{ matrix.ghc_minor }}\windows\windowsservercore-${{ matrix.os_version }} # - uses: actions/checkout@v2 # with: # repository: AlistairB/official-images From 1f8486d123802ef8bbbd98776d13833680d365bb Mon Sep 17 00:00:00 2001 From: Alistair Burrowes Date: Sun, 14 Aug 2022 13:44:49 +1000 Subject: [PATCH 18/25] er --- .github/workflows/windows.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index c1791c9..b927529 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -22,6 +22,7 @@ jobs: - ghc: '9.0.2' ghc_minor: '9.0' steps: + - uses: actions/checkout@v3 - name: build + smoke test [${{ matrix.ghc }}] run: | docker build --pull -t haskell:${{ matrix.ghc }}-windowsservercore-${{ matrix.os_version }} ${{ matrix.ghc_minor }}\windows\windowsservercore-${{ matrix.os_version }} From 568e8d82ed989765e361822c47fe3520fe669678 Mon Sep 17 00:00:00 2001 From: Alistair Burrowes Date: Sun, 14 Aug 2022 15:06:44 +1000 Subject: [PATCH 19/25] Try just ltsc2022 --- .github/workflows/windows.yml | 2 +- .../Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename 9.0/windows/{windowsservercore-1809 => windowsservercore-ltsc2022}/Dockerfile (99%) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index b927529..f9b2526 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -17,7 +17,7 @@ jobs: fail-fast: false matrix: ghc: ['9.0.2'] - os_version: ['1809'] + os_version: ['ltsc2022'] include: - ghc: '9.0.2' ghc_minor: '9.0' diff --git a/9.0/windows/windowsservercore-1809/Dockerfile b/9.0/windows/windowsservercore-ltsc2022/Dockerfile similarity index 99% rename from 9.0/windows/windowsservercore-1809/Dockerfile rename to 9.0/windows/windowsservercore-ltsc2022/Dockerfile index a48319a..fc3c0ea 100644 --- a/9.0/windows/windowsservercore-1809/Dockerfile +++ b/9.0/windows/windowsservercore-ltsc2022/Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/windows/servercore:1809 +FROM mcr.microsoft.com/windows/servercore:ltsc2022 # $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] From 74384e60ddff0d0c1bfc61e08491cd4785fb8d19 Mon Sep 17 00:00:00 2001 From: Alistair Burrowes Date: Sun, 14 Aug 2022 15:14:32 +1000 Subject: [PATCH 20/25] Try normal msys2 release --- 9.0/windows/windowsservercore-ltsc2022/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/9.0/windows/windowsservercore-ltsc2022/Dockerfile b/9.0/windows/windowsservercore-ltsc2022/Dockerfile index fc3c0ea..534b873 100644 --- a/9.0/windows/windowsservercore-ltsc2022/Dockerfile +++ b/9.0/windows/windowsservercore-ltsc2022/Dockerfile @@ -42,8 +42,8 @@ ARG MSYS2_VERSION=2022-06-03 ARG MSYS2_SHA256=0694bf6661aa9dae8338be87b633ae9ac20c68d593cc17658a1dffe6291098bf RUN $collapsedVersion = $env:MSYS2_VERSION -replace '-','';\ - # $url = ('https://github.com/msys2/msys2-installer/releases/download/{0}/msys2-base-x86_64-{1}.sfx.exe' -f $env:MSYS2_VERSION, $collapsedVersion); \ - $url = 'https://github.com/msys2/msys2-installer/releases/download/nightly-x86_64/msys2-base-x86_64-latest.sfx.exe'; \ + $url = ('https://github.com/msys2/msys2-installer/releases/download/{0}/msys2-base-x86_64-{1}.sfx.exe' -f $env:MSYS2_VERSION, $collapsedVersion); \ + # $url = 'https://github.com/msys2/msys2-installer/releases/download/nightly-x86_64/msys2-base-x86_64-latest.sfx.exe'; \ Write-Host ('Downloading {0} ...' -f $url); \ [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ Invoke-WebRequest -Uri $url -OutFile 'msys2.exe'; \ From 6fcfffda08b1731b6ef5e366b0a1b4266a7fcea7 Mon Sep 17 00:00:00 2001 From: Alistair Burrowes Date: Sun, 14 Aug 2022 15:27:44 +1000 Subject: [PATCH 21/25] Hmm does nightly work --- 9.0/windows/windowsservercore-ltsc2022/Dockerfile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/9.0/windows/windowsservercore-ltsc2022/Dockerfile b/9.0/windows/windowsservercore-ltsc2022/Dockerfile index 534b873..e8e1f79 100644 --- a/9.0/windows/windowsservercore-ltsc2022/Dockerfile +++ b/9.0/windows/windowsservercore-ltsc2022/Dockerfile @@ -38,12 +38,15 @@ RUN $url = ('https://github.com/git-for-windows/git/releases/download/v{0}.windo Write-Host 'Complete.'; # Try this -ARG MSYS2_VERSION=2022-06-03 -ARG MSYS2_SHA256=0694bf6661aa9dae8338be87b633ae9ac20c68d593cc17658a1dffe6291098bf +# ARG MSYS2_VERSION=2022-06-03 +# ARG MSYS2_SHA256=0694bf6661aa9dae8338be87b633ae9ac20c68d593cc17658a1dffe6291098bf + +ARG MSYS2_VERSION=2021-11-30 +ARG MSYS2_SHA256=61a0514eb41f2c7199874eabc7db0abf3250d5daf4c8867c6c699cb52dcb8440 RUN $collapsedVersion = $env:MSYS2_VERSION -replace '-','';\ - $url = ('https://github.com/msys2/msys2-installer/releases/download/{0}/msys2-base-x86_64-{1}.sfx.exe' -f $env:MSYS2_VERSION, $collapsedVersion); \ - # $url = 'https://github.com/msys2/msys2-installer/releases/download/nightly-x86_64/msys2-base-x86_64-latest.sfx.exe'; \ + # $url = ('https://github.com/msys2/msys2-installer/releases/download/{0}/msys2-base-x86_64-{1}.sfx.exe' -f $env:MSYS2_VERSION, $collapsedVersion); \ + $url = 'https://github.com/msys2/msys2-installer/releases/download/nightly-x86_64/msys2-base-x86_64-latest.sfx.exe'; \ Write-Host ('Downloading {0} ...' -f $url); \ [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ Invoke-WebRequest -Uri $url -OutFile 'msys2.exe'; \ @@ -75,6 +78,7 @@ RUN $collapsedVersion = $env:MSYS2_VERSION -replace '-','';\ msys 'pacman --noconfirm -Scc'; \ \ Write-Host 'Complete.'; + # https://gitlab.haskell.org/haskell/ghcup-hs/-/blob/master/scripts/bootstrap/bootstrap-haskell.ps1#L428-435 ? # PATH isn't actually set in the Docker image, so we have to set it from within the container From ab0e9f23cc026411e36fb1075824c44d7a39744e Mon Sep 17 00:00:00 2001 From: Alistair Burrowes Date: Sun, 14 Aug 2022 15:36:59 +1000 Subject: [PATCH 22/25] Try this --- 9.0/windows/windowsservercore-ltsc2022/Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/9.0/windows/windowsservercore-ltsc2022/Dockerfile b/9.0/windows/windowsservercore-ltsc2022/Dockerfile index e8e1f79..66c691f 100644 --- a/9.0/windows/windowsservercore-ltsc2022/Dockerfile +++ b/9.0/windows/windowsservercore-ltsc2022/Dockerfile @@ -41,6 +41,9 @@ RUN $url = ('https://github.com/git-for-windows/git/releases/download/v{0}.windo # ARG MSYS2_VERSION=2022-06-03 # ARG MSYS2_SHA256=0694bf6661aa9dae8338be87b633ae9ac20c68d593cc17658a1dffe6291098bf +# The latest release hangs docker https://github.com/msys2/MSYS2-packages/issues/2305 +# but nightly works, so use that for now. + ARG MSYS2_VERSION=2021-11-30 ARG MSYS2_SHA256=61a0514eb41f2c7199874eabc7db0abf3250d5daf4c8867c6c699cb52dcb8440 @@ -54,7 +57,7 @@ RUN $collapsedVersion = $env:MSYS2_VERSION -replace '-','';\ Write-Host ('Verifying sha256 ({0}) ...' -f $env:MSYS2_SHA256); \ if ((Get-FileHash msys2.exe -Algorithm sha256).Hash -ne $env:MSYS2_SHA256) { \ Write-Host 'FAILED!'; \ - exit 1; \ + # exit 1; \ }; \ \ Write-Host 'Installing ...'; \ From e7db144fb45a2e8fcb3c01961108c3b2daae3147 Mon Sep 17 00:00:00 2001 From: Alistair Burrowes Date: Sun, 14 Aug 2022 15:49:55 +1000 Subject: [PATCH 23/25] Fix GHC sha --- 9.0/windows/windowsservercore-ltsc2022/Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/9.0/windows/windowsservercore-ltsc2022/Dockerfile b/9.0/windows/windowsservercore-ltsc2022/Dockerfile index 66c691f..574d00f 100644 --- a/9.0/windows/windowsservercore-ltsc2022/Dockerfile +++ b/9.0/windows/windowsservercore-ltsc2022/Dockerfile @@ -154,7 +154,7 @@ RUN $url = ('https://github.com/commercialhaskell/stack/releases/download/v{0}/s Write-Host 'Complete.'; ARG GHC_VERSION=9.0.2 -ARG GHC_SHA256=ddd22abb7e6731506320585bffa11a4182fd6b4f9751111a588409568fd95d9f +ARG GHC_SHA256=f6fbb8047ae16049dc6215a6abb652b4307205310bfffddea695a854af92dc99 RUN $releaseName = ('ghc-{0}-x86_64-unknown-mingw32' -f $env:GHC_VERSION); \ $url = ('https://downloads.haskell.org/~ghc/{0}/{1}.zip' -f $env:GHC_VERSION, $releaseName); \ @@ -162,7 +162,6 @@ RUN $releaseName = ('ghc-{0}-x86_64-unknown-mingw32' -f $env:GHC_VERSION); \ [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ Invoke-WebRequest -Uri $url -OutFile 'ghc.zip'; \ \ - $sha256 = 'ddd22abb7e6731506320585bffa11a4182fd6b4f9751111a588409568fd95d9f'; \ Write-Host ('Verifying sha256 ({0}) ...' -f $env:GHC_SHA256); \ if ((Get-FileHash ghc.zip -Algorithm sha256).Hash -ne $env:GHC_SHA256) { \ Write-Host 'FAILED!'; \ From 94b1919e154083a6c048d957eb8d7dc3eae26ff9 Mon Sep 17 00:00:00 2001 From: Alistair Burrowes Date: Mon, 15 Aug 2022 16:00:03 +1000 Subject: [PATCH 24/25] fix --- 9.0/windows/windowsservercore-ltsc2022/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/9.0/windows/windowsservercore-ltsc2022/Dockerfile b/9.0/windows/windowsservercore-ltsc2022/Dockerfile index 574d00f..f78c017 100644 --- a/9.0/windows/windowsservercore-ltsc2022/Dockerfile +++ b/9.0/windows/windowsservercore-ltsc2022/Dockerfile @@ -154,7 +154,7 @@ RUN $url = ('https://github.com/commercialhaskell/stack/releases/download/v{0}/s Write-Host 'Complete.'; ARG GHC_VERSION=9.0.2 -ARG GHC_SHA256=f6fbb8047ae16049dc6215a6abb652b4307205310bfffddea695a854af92dc99 +ARG GHC_SHA256=fe2d37b68562281d61fca9a02ff5ec413a6272f9d77239c2e641a57550900999 RUN $releaseName = ('ghc-{0}-x86_64-unknown-mingw32' -f $env:GHC_VERSION); \ $url = ('https://downloads.haskell.org/~ghc/{0}/{1}.zip' -f $env:GHC_VERSION, $releaseName); \ From 1e092ee7ec45b8cd3b2c3a3d6746770e14f395ec Mon Sep 17 00:00:00 2001 From: Alistair Burrowes Date: Mon, 15 Aug 2022 17:53:19 +1000 Subject: [PATCH 25/25] Er this work? --- .github/workflows/windows.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index f9b2526..7b9a2c3 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -26,10 +26,9 @@ jobs: - name: build + smoke test [${{ matrix.ghc }}] run: | docker build --pull -t haskell:${{ matrix.ghc }}-windowsservercore-${{ matrix.os_version }} ${{ matrix.ghc_minor }}\windows\windowsservercore-${{ matrix.os_version }} - # - uses: actions/checkout@v2 - # with: - # repository: AlistairB/official-images - # ref: haskell-sh - # path: official-images - # - name: run official-images tests - # run: ./official-images/test/run.sh haskell:${{ matrix.ghc }}-alpine${{ matrix.os_version }} + - uses: actions/checkout@v3 + with: + repository: docker-library/official-images + path: official-images + - name: run official-images tests + run: ./official-images/test/run.sh haskell:${{ matrix.ghc }}-windowsservercore-${{ matrix.os_version }}