Commit 56395a48 authored by Eric Timmons's avatar Eric Timmons
Browse files

Hopefully finish Windows revamp

[skip ci]
parent de2d8000
Loading
Loading
Loading
Loading
+7 −92
Changes for 2.1.9/windowsservercore-1809/Dockerfile: 7 added lines, 92 removed lines.
Original line number Diff line number Diff line
@@ -24,13 +24,13 @@ RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tl
    taskkill /F /FI 'MODULES eq msys-2.0.dll'; \
    \
    echo 'Clearing Recycle Bin (see https://github.com/docker/for-win/issues/8910)'; \
    Remove-Item -Force -Recursive -Path 'C:\$Recycle.Bin';
    If (Test-Path 'C:\$Recycle.Bin') { Remove-Item -Force -Recurse -Path 'C:\$Recycle.Bin'; };

# Install common tools. Eventually make this equivalent to buildpack-deps.
RUN function msys() { C:\msys64\usr\bin\bash.exe @('-lc') + @Args; } \
    $env:CHERE_INVOKING = 'yes'; \
    $env:MSYSTEM = 'MINGW64'; \
    msys 'pacman -S --noconfirm --needed mingw-w64-x86_64-gcc make diffutils tar unzip mingw-w64-zlib git' \
    msys 'pacman -S --noconfirm --needed mingw-w64-x86_64-gcc make diffutils tar unzip mingw-w64-x86_64-zlib git' \
    \
    echo 'Installing WIX.'; \
    Invoke-WebRequest -Uri 'https://github.com/wixtoolset/wix3/releases/download/wix3112rtm/wix311-binaries.zip' -OutFile wix311-binaries.zip; \
@@ -44,7 +44,7 @@ RUN function msys() { C:\msys64\usr\bin\bash.exe @('-lc') + @Args; } \
    taskkill /F /FI 'MODULES eq msys-2.0.dll'; \
    \
    echo 'Clearing Recycle Bin (see https://github.com/docker/for-win/issues/8910)'; \
    Remove-Item -Force -Recursive -Path 'C:\$Recycle.Bin';
    If (Test-Path 'C:\$Recycle.Bin') { Remove-Item -Force -Recurse -Path 'C:\$Recycle.Bin'; };

ENV SBCL_VERSION 2.1.9
ENV SBCL_SOURCE_SHA256 9e746ff12c4f78d2deabd95e48169b552f9472808cf8b8fc801d84df3e962fa1
@@ -52,12 +52,14 @@ ENV SBCL_SOURCE_SHA256 9e746ff12c4f78d2deabd95e48169b552f9472808cf8b8fc801d84df3
RUN function msys() { C:\msys64\usr\bin\bash.exe @('-lc') + @Args; } \
    $env:CHERE_INVOKING = 'yes'; \
    $env:MSYSTEM = 'MINGW64'; \
    $env:MSYS2_PATH_TYPE = 'inherit'; \
    \
    echo 'Downloading the bootstrap SBCL'; \
    Invoke-WebRequest -Uri 'https://github.com/sbcl/sbcl/releases/download/sbcl-1.4.14/sbcl-1.4.14-x86-64-windows-binary.msi' -OutFile sbcl-bootstrap.msi; \
    Start-Process msiexec.exe -Wait -ArgumentList '/I C:\sbcl-bootstrap.msi'; \
    rm sbcl-bootstrap.msi; \
    $env:SBCL_HOME = 'C:\Program Files\Steel Bank Common Lisp\1.4.14\'; \
    $env:PATH = ('C:\Program Files\Steel Bank Common Lisp\1.4.14\;{0}' -f $env:PATH); \
    \
    echo 'Downloading SBCL source'; \
    $sbclurl = ('https://downloads.sourceforge.net/project/sbcl/sbcl/{0}/sbcl-{0}-source.tar.bz2' -f $env:SBCL_VERSION); \
@@ -76,7 +78,7 @@ RUN function msys() { C:\msys64\usr\bin\bash.exe @('-lc') + @Args; } \
    \
    echo 'Building SBCL'; \
    $env:WIX = '/c/wix'; \
    msys './make.sh --with-sb-linkable-runtime --xc-host="C:/Program Files/Steel Bank Common Lisp/1.4.14/sbcl.exe'; \
    msys './make.sh --with-sb-linkable-runtime'; \
    msys './make-windows-installer.sh'; \
    cd ..; \
    \
@@ -91,93 +93,6 @@ RUN function msys() { C:\msys64\usr\bin\bash.exe @('-lc') + @Args; } \
    taskkill /F /FI 'MODULES eq msys-2.0.dll'; \
    \
    echo 'Clearing Recycle Bin (see https://github.com/docker/for-win/issues/8910)'; \
    Remove-Item -Force -Recursive -Path 'C:\$Recycle.Bin';

# RUN echo 'Saving original machine PATH'; \
#     $machineKey = [Microsoft.Win32.Registry]::LocalMachine.OpenSubKey('SYSTEM\ControlSet001\Control\Session Manager\Environment\'); \
#     $machinePath = $machineKey.GetValue('PATH', [string]::Empty, 'DoNotExpandEnvironmentNames').ToString(); \
#     $machineKey.Close(); \
#     \
#     [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
#     echo 'Installing choco'; \
#     Set-ExecutionPolicy Bypass -Scope Process -Force; \
#     iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')); \
#     Import-Module 'C:\ProgramData\chocolatey\helpers\chocolateyProfile.psm1'; \
#     \
#     echo 'Installing unzip'; \
#     choco install -y unzip; \
#     \
#     echo 'Installing WIX. As of last check, dotnet35 is broken in chocolatey'; \
#     Invoke-WebRequest -Uri 'https://github.com/wixtoolset/wix3/releases/download/wix3112rtm/wix311-binaries.zip' -OutFile wix311-binaries.zip; \
#     mkdir wix/bin; \
#     cd wix/bin; \
#     unzip ../../wix311-binaries.zip; \
#     cd ../../; \
#     rm wix311-binaries.zip; \
#     \
#     echo 'Installing SBCL 1.4.14'; \
#     Invoke-WebRequest -Uri 'https://github.com/sbcl/sbcl/raw/master/tools-for-build/sbcl.1.4.14.nupkg' -OutFile sbcl.1.4.14.nupkg; \
#     choco install -y sbcl --source .; \
#     refreshenv; \
#     sbcl --version; \
#     sbcl --eval '(print (+ 1 2))'; \
#     rm sbcl.1.4.14.nupkg; \
#     \
#     echo 'Installing msys2'; \
#     choco install -y msys2 --params '/NoUpdate' ; \
#     $env:PATH = ('C:\tools\msys64\usr\bin;c:\tools\msys64\mingw64\bin;{0}' -f $env:PATH); \
#     \
#     echo 'Installing build tools'; \
#     pacman -S --noconfirm --needed mingw-w64-x86_64-gcc make diffutils tar; \
#     \
#     echo 'Downloading SBCL source'; \
#     $sbclurl = ('https://downloads.sourceforge.net/project/sbcl/sbcl/{0}/sbcl-{0}-source.tar.bz2' -f $env:SBCL_VERSION); \
#     Invoke-WebRequest -Uri $sbclurl -OutFile sbcl-source.tar.bz2 -UserAgent "NativeHost"; \
#     $actualsha256 = (Get-FileHash sbcl-source.tar.bz2 -Algorithm sha256).Hash; \
#     Write-Host ('Verifying sha256 {0} (expected: {1})' -f $actualsha256, $env:SBCL_SOURCE_SHA256); \
#     if ($actualsha256 -ne $env:SBCL_SOURCE_SHA256) { \
#         Write-Host 'SHA256 check FAILED!'; \
#         exit 1; \
#     }; \
#     \
#     echo 'Unpacking source'; \
#     sh -c 'tar -x -v -f sbcl-source.tar.bz2'; \
#     rm sbcl-source.tar.bz2; \
#     cd sbcl-$env:SBCL_VERSION; \
#     \
#     echo 'Building SBCL'; \
#     $env:WIX = '/c/wix'; \
#     sh ./make.sh --with-sb-linkable-runtime ; \
#     sh ./make-windows-installer.sh; \
#     cd ..; \
#     \
#     echo 'Removing WIX.'; \
#     rm -r wix; \
#     \
#     echo 'Removing msys2'; \
#     choco uninstall -y msys2; \
#     Remove-Item -Force -Recurse -Path C:\tools; \
#     \
#     echo 'Removing build SBCL'; \
#     choco uninstall -y sbcl; \
#     \
#     echo 'Removing chocolatey'; \
#     Remove-Item -Force -Recurse -Path C:\ProgramData\chocolatey; \
#     $machineKey = [Microsoft.Win32.Registry]::LocalMachine.OpenSubKey('SYSTEM\ControlSet001\Control\Session Manager\Environment\', $true); \
#     $machineKey.SetValue('PATH', $machinePath, 'ExpandString'); \
#     $machineKey.Close(); \
#     [Environment]::SetEnvironmentVariable('ChocolateyInstall', [string]::Empty, 'User'); \
#     [Environment]::SetEnvironmentVariable('ChocolateyInstall', [string]::Empty, 'Machine'); \
#     [Environment]::SetEnvironmentVariable('ChocolateyLastPathUpdate', [string]::Empty, 'User'); \
#     [Environment]::SetEnvironmentVariable('ChocolateyLastPathUpdate', [string]::Empty, 'Machine'); \
#     [Environment]::SetEnvironmentVariable('ChocolateyToolsLocation', [string]::Empty, 'User'); \
#     [Environment]::SetEnvironmentVariable('ChocolateyToolsLocation', [string]::Empty, 'Machine'); \
#     \
#     echo 'Installing SBCL'; \
#     cp C:\sbcl-$env:SBCL_VERSION\output\sbcl-$env:SBCL_VERSION-x86-64-windows-binary.msi sbcl-installer.msi; \
#     Start-Process msiexec.exe -Wait -ArgumentList '/I C:\sbcl-installer.msi'; \
#     echo 'Removing SBCL Source'; \
#     Remove-Item -Force -Recurse -Path C:\sbcl-$env:SBCL_VERSION; \
#     Remove-Item -Force -Path C:\sbcl-installer.msi;
    If (Test-Path 'C:\$Recycle.Bin') { Remove-Item -Force -Recurse -Path 'C:\$Recycle.Bin'; };

CMD ["sbcl"]
+7 −92
Changes for 2.1.9/windowsservercore-ltsc2016/Dockerfile: 7 added lines, 92 removed lines.
Original line number Diff line number Diff line
@@ -24,13 +24,13 @@ RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tl
    taskkill /F /FI 'MODULES eq msys-2.0.dll'; \
    \
    echo 'Clearing Recycle Bin (see https://github.com/docker/for-win/issues/8910)'; \
    Remove-Item -Force -Recursive -Path 'C:\$Recycle.Bin';
    If (Test-Path 'C:\$Recycle.Bin') { Remove-Item -Force -Recurse -Path 'C:\$Recycle.Bin'; };

# Install common tools. Eventually make this equivalent to buildpack-deps.
RUN function msys() { C:\msys64\usr\bin\bash.exe @('-lc') + @Args; } \
    $env:CHERE_INVOKING = 'yes'; \
    $env:MSYSTEM = 'MINGW64'; \
    msys 'pacman -S --noconfirm --needed mingw-w64-x86_64-gcc make diffutils tar unzip mingw-w64-zlib git' \
    msys 'pacman -S --noconfirm --needed mingw-w64-x86_64-gcc make diffutils tar unzip mingw-w64-x86_64-zlib git' \
    \
    echo 'Installing WIX.'; \
    Invoke-WebRequest -Uri 'https://github.com/wixtoolset/wix3/releases/download/wix3112rtm/wix311-binaries.zip' -OutFile wix311-binaries.zip; \
@@ -44,7 +44,7 @@ RUN function msys() { C:\msys64\usr\bin\bash.exe @('-lc') + @Args; } \
    taskkill /F /FI 'MODULES eq msys-2.0.dll'; \
    \
    echo 'Clearing Recycle Bin (see https://github.com/docker/for-win/issues/8910)'; \
    Remove-Item -Force -Recursive -Path 'C:\$Recycle.Bin';
    If (Test-Path 'C:\$Recycle.Bin') { Remove-Item -Force -Recurse -Path 'C:\$Recycle.Bin'; };

ENV SBCL_VERSION 2.1.9
ENV SBCL_SOURCE_SHA256 9e746ff12c4f78d2deabd95e48169b552f9472808cf8b8fc801d84df3e962fa1
@@ -52,12 +52,14 @@ ENV SBCL_SOURCE_SHA256 9e746ff12c4f78d2deabd95e48169b552f9472808cf8b8fc801d84df3
RUN function msys() { C:\msys64\usr\bin\bash.exe @('-lc') + @Args; } \
    $env:CHERE_INVOKING = 'yes'; \
    $env:MSYSTEM = 'MINGW64'; \
    $env:MSYS2_PATH_TYPE = 'inherit'; \
    \
    echo 'Downloading the bootstrap SBCL'; \
    Invoke-WebRequest -Uri 'https://github.com/sbcl/sbcl/releases/download/sbcl-1.4.14/sbcl-1.4.14-x86-64-windows-binary.msi' -OutFile sbcl-bootstrap.msi; \
    Start-Process msiexec.exe -Wait -ArgumentList '/I C:\sbcl-bootstrap.msi'; \
    rm sbcl-bootstrap.msi; \
    $env:SBCL_HOME = 'C:\Program Files\Steel Bank Common Lisp\1.4.14\'; \
    $env:PATH = ('C:\Program Files\Steel Bank Common Lisp\1.4.14\;{0}' -f $env:PATH); \
    \
    echo 'Downloading SBCL source'; \
    $sbclurl = ('https://downloads.sourceforge.net/project/sbcl/sbcl/{0}/sbcl-{0}-source.tar.bz2' -f $env:SBCL_VERSION); \
@@ -76,7 +78,7 @@ RUN function msys() { C:\msys64\usr\bin\bash.exe @('-lc') + @Args; } \
    \
    echo 'Building SBCL'; \
    $env:WIX = '/c/wix'; \
    msys './make.sh --with-sb-linkable-runtime --xc-host="C:/Program Files/Steel Bank Common Lisp/1.4.14/sbcl.exe'; \
    msys './make.sh --with-sb-linkable-runtime'; \
    msys './make-windows-installer.sh'; \
    cd ..; \
    \
@@ -91,93 +93,6 @@ RUN function msys() { C:\msys64\usr\bin\bash.exe @('-lc') + @Args; } \
    taskkill /F /FI 'MODULES eq msys-2.0.dll'; \
    \
    echo 'Clearing Recycle Bin (see https://github.com/docker/for-win/issues/8910)'; \
    Remove-Item -Force -Recursive -Path 'C:\$Recycle.Bin';

# RUN echo 'Saving original machine PATH'; \
#     $machineKey = [Microsoft.Win32.Registry]::LocalMachine.OpenSubKey('SYSTEM\ControlSet001\Control\Session Manager\Environment\'); \
#     $machinePath = $machineKey.GetValue('PATH', [string]::Empty, 'DoNotExpandEnvironmentNames').ToString(); \
#     $machineKey.Close(); \
#     \
#     [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
#     echo 'Installing choco'; \
#     Set-ExecutionPolicy Bypass -Scope Process -Force; \
#     iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')); \
#     Import-Module 'C:\ProgramData\chocolatey\helpers\chocolateyProfile.psm1'; \
#     \
#     echo 'Installing unzip'; \
#     choco install -y unzip; \
#     \
#     echo 'Installing WIX. As of last check, dotnet35 is broken in chocolatey'; \
#     Invoke-WebRequest -Uri 'https://github.com/wixtoolset/wix3/releases/download/wix3112rtm/wix311-binaries.zip' -OutFile wix311-binaries.zip; \
#     mkdir wix/bin; \
#     cd wix/bin; \
#     unzip ../../wix311-binaries.zip; \
#     cd ../../; \
#     rm wix311-binaries.zip; \
#     \
#     echo 'Installing SBCL 1.4.14'; \
#     Invoke-WebRequest -Uri 'https://github.com/sbcl/sbcl/raw/master/tools-for-build/sbcl.1.4.14.nupkg' -OutFile sbcl.1.4.14.nupkg; \
#     choco install -y sbcl --source .; \
#     refreshenv; \
#     sbcl --version; \
#     sbcl --eval '(print (+ 1 2))'; \
#     rm sbcl.1.4.14.nupkg; \
#     \
#     echo 'Installing msys2'; \
#     choco install -y msys2 --params '/NoUpdate' ; \
#     $env:PATH = ('C:\tools\msys64\usr\bin;c:\tools\msys64\mingw64\bin;{0}' -f $env:PATH); \
#     \
#     echo 'Installing build tools'; \
#     pacman -S --noconfirm --needed mingw-w64-x86_64-gcc make diffutils tar; \
#     \
#     echo 'Downloading SBCL source'; \
#     $sbclurl = ('https://downloads.sourceforge.net/project/sbcl/sbcl/{0}/sbcl-{0}-source.tar.bz2' -f $env:SBCL_VERSION); \
#     Invoke-WebRequest -Uri $sbclurl -OutFile sbcl-source.tar.bz2 -UserAgent "NativeHost"; \
#     $actualsha256 = (Get-FileHash sbcl-source.tar.bz2 -Algorithm sha256).Hash; \
#     Write-Host ('Verifying sha256 {0} (expected: {1})' -f $actualsha256, $env:SBCL_SOURCE_SHA256); \
#     if ($actualsha256 -ne $env:SBCL_SOURCE_SHA256) { \
#         Write-Host 'SHA256 check FAILED!'; \
#         exit 1; \
#     }; \
#     \
#     echo 'Unpacking source'; \
#     sh -c 'tar -x -v -f sbcl-source.tar.bz2'; \
#     rm sbcl-source.tar.bz2; \
#     cd sbcl-$env:SBCL_VERSION; \
#     \
#     echo 'Building SBCL'; \
#     $env:WIX = '/c/wix'; \
#     sh ./make.sh --with-sb-linkable-runtime ; \
#     sh ./make-windows-installer.sh; \
#     cd ..; \
#     \
#     echo 'Removing WIX.'; \
#     rm -r wix; \
#     \
#     echo 'Removing msys2'; \
#     choco uninstall -y msys2; \
#     Remove-Item -Force -Recurse -Path C:\tools; \
#     \
#     echo 'Removing build SBCL'; \
#     choco uninstall -y sbcl; \
#     \
#     echo 'Removing chocolatey'; \
#     Remove-Item -Force -Recurse -Path C:\ProgramData\chocolatey; \
#     $machineKey = [Microsoft.Win32.Registry]::LocalMachine.OpenSubKey('SYSTEM\ControlSet001\Control\Session Manager\Environment\', $true); \
#     $machineKey.SetValue('PATH', $machinePath, 'ExpandString'); \
#     $machineKey.Close(); \
#     [Environment]::SetEnvironmentVariable('ChocolateyInstall', [string]::Empty, 'User'); \
#     [Environment]::SetEnvironmentVariable('ChocolateyInstall', [string]::Empty, 'Machine'); \
#     [Environment]::SetEnvironmentVariable('ChocolateyLastPathUpdate', [string]::Empty, 'User'); \
#     [Environment]::SetEnvironmentVariable('ChocolateyLastPathUpdate', [string]::Empty, 'Machine'); \
#     [Environment]::SetEnvironmentVariable('ChocolateyToolsLocation', [string]::Empty, 'User'); \
#     [Environment]::SetEnvironmentVariable('ChocolateyToolsLocation', [string]::Empty, 'Machine'); \
#     \
#     echo 'Installing SBCL'; \
#     cp C:\sbcl-$env:SBCL_VERSION\output\sbcl-$env:SBCL_VERSION-x86-64-windows-binary.msi sbcl-installer.msi; \
#     Start-Process msiexec.exe -Wait -ArgumentList '/I C:\sbcl-installer.msi'; \
#     echo 'Removing SBCL Source'; \
#     Remove-Item -Force -Recurse -Path C:\sbcl-$env:SBCL_VERSION; \
#     Remove-Item -Force -Path C:\sbcl-installer.msi;
    If (Test-Path 'C:\$Recycle.Bin') { Remove-Item -Force -Recurse -Path 'C:\$Recycle.Bin'; };

CMD ["sbcl"]
+7 −92
Changes for Dockerfile-windowsservercore.template: 7 added lines, 92 removed lines.
Original line number Diff line number Diff line
@@ -19,13 +19,13 @@ RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tl
    taskkill /F /FI 'MODULES eq msys-2.0.dll'; \
    \
    echo 'Clearing Recycle Bin (see https://github.com/docker/for-win/issues/8910)'; \
    Remove-Item -Force -Recursive -Path 'C:\$Recycle.Bin';
    If (Test-Path 'C:\$Recycle.Bin') { Remove-Item -Force -Recurse -Path 'C:\$Recycle.Bin'; };

# Install common tools. Eventually make this equivalent to buildpack-deps.
RUN function msys() { C:\msys64\usr\bin\bash.exe @('-lc') + @Args; } \
    $env:CHERE_INVOKING = 'yes'; \
    $env:MSYSTEM = 'MINGW64'; \
    msys 'pacman -S --noconfirm --needed mingw-w64-x86_64-gcc make diffutils tar unzip mingw-w64-zlib git' \
    msys 'pacman -S --noconfirm --needed mingw-w64-x86_64-gcc make diffutils tar unzip mingw-w64-x86_64-zlib git' \
    \
    echo 'Installing WIX.'; \
    Invoke-WebRequest -Uri 'https://github.com/wixtoolset/wix3/releases/download/wix3112rtm/wix311-binaries.zip' -OutFile wix311-binaries.zip; \
@@ -39,7 +39,7 @@ RUN function msys() { C:\msys64\usr\bin\bash.exe @('-lc') + @Args; } \
    taskkill /F /FI 'MODULES eq msys-2.0.dll'; \
    \
    echo 'Clearing Recycle Bin (see https://github.com/docker/for-win/issues/8910)'; \
    Remove-Item -Force -Recursive -Path 'C:\$Recycle.Bin';
    If (Test-Path 'C:\$Recycle.Bin') { Remove-Item -Force -Recurse -Path 'C:\$Recycle.Bin'; };

ENV SBCL_VERSION PLACEHOLDER
ENV SBCL_SOURCE_SHA256 PLACEHOLDER
@@ -47,12 +47,14 @@ ENV SBCL_SOURCE_SHA256 PLACEHOLDER
RUN function msys() { C:\msys64\usr\bin\bash.exe @('-lc') + @Args; } \
    $env:CHERE_INVOKING = 'yes'; \
    $env:MSYSTEM = 'MINGW64'; \
    $env:MSYS2_PATH_TYPE = 'inherit'; \
    \
    echo 'Downloading the bootstrap SBCL'; \
    Invoke-WebRequest -Uri 'https://github.com/sbcl/sbcl/releases/download/sbcl-1.4.14/sbcl-1.4.14-x86-64-windows-binary.msi' -OutFile sbcl-bootstrap.msi; \
    Start-Process msiexec.exe -Wait -ArgumentList '/I C:\sbcl-bootstrap.msi'; \
    rm sbcl-bootstrap.msi; \
    $env:SBCL_HOME = 'C:\Program Files\Steel Bank Common Lisp\1.4.14\'; \
    $env:PATH = ('C:\Program Files\Steel Bank Common Lisp\1.4.14\;{0}' -f $env:PATH); \
    \
    echo 'Downloading SBCL source'; \
    $sbclurl = ('https://downloads.sourceforge.net/project/sbcl/sbcl/{0}/sbcl-{0}-source.tar.bz2' -f $env:SBCL_VERSION); \
@@ -71,7 +73,7 @@ RUN function msys() { C:\msys64\usr\bin\bash.exe @('-lc') + @Args; } \
    \
    echo 'Building SBCL'; \
    $env:WIX = '/c/wix'; \
    msys './make.sh --with-sb-linkable-runtime --xc-host="C:/Program Files/Steel Bank Common Lisp/1.4.14/sbcl.exe'; \
    msys './make.sh --with-sb-linkable-runtime'; \
    msys './make-windows-installer.sh'; \
    cd ..; \
    \
@@ -86,93 +88,6 @@ RUN function msys() { C:\msys64\usr\bin\bash.exe @('-lc') + @Args; } \
    taskkill /F /FI 'MODULES eq msys-2.0.dll'; \
    \
    echo 'Clearing Recycle Bin (see https://github.com/docker/for-win/issues/8910)'; \
    Remove-Item -Force -Recursive -Path 'C:\$Recycle.Bin';

# RUN echo 'Saving original machine PATH'; \
#     $machineKey = [Microsoft.Win32.Registry]::LocalMachine.OpenSubKey('SYSTEM\ControlSet001\Control\Session Manager\Environment\'); \
#     $machinePath = $machineKey.GetValue('PATH', [string]::Empty, 'DoNotExpandEnvironmentNames').ToString(); \
#     $machineKey.Close(); \
#     \
#     [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
#     echo 'Installing choco'; \
#     Set-ExecutionPolicy Bypass -Scope Process -Force; \
#     iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')); \
#     Import-Module 'C:\ProgramData\chocolatey\helpers\chocolateyProfile.psm1'; \
#     \
#     echo 'Installing unzip'; \
#     choco install -y unzip; \
#     \
#     echo 'Installing WIX. As of last check, dotnet35 is broken in chocolatey'; \
#     Invoke-WebRequest -Uri 'https://github.com/wixtoolset/wix3/releases/download/wix3112rtm/wix311-binaries.zip' -OutFile wix311-binaries.zip; \
#     mkdir wix/bin; \
#     cd wix/bin; \
#     unzip ../../wix311-binaries.zip; \
#     cd ../../; \
#     rm wix311-binaries.zip; \
#     \
#     echo 'Installing SBCL 1.4.14'; \
#     Invoke-WebRequest -Uri 'https://github.com/sbcl/sbcl/raw/master/tools-for-build/sbcl.1.4.14.nupkg' -OutFile sbcl.1.4.14.nupkg; \
#     choco install -y sbcl --source .; \
#     refreshenv; \
#     sbcl --version; \
#     sbcl --eval '(print (+ 1 2))'; \
#     rm sbcl.1.4.14.nupkg; \
#     \
#     echo 'Installing msys2'; \
#     choco install -y msys2 --params '/NoUpdate' ; \
#     $env:PATH = ('C:\tools\msys64\usr\bin;c:\tools\msys64\mingw64\bin;{0}' -f $env:PATH); \
#     \
#     echo 'Installing build tools'; \
#     pacman -S --noconfirm --needed mingw-w64-x86_64-gcc make diffutils tar; \
#     \
#     echo 'Downloading SBCL source'; \
#     $sbclurl = ('https://downloads.sourceforge.net/project/sbcl/sbcl/{0}/sbcl-{0}-source.tar.bz2' -f $env:SBCL_VERSION); \
#     Invoke-WebRequest -Uri $sbclurl -OutFile sbcl-source.tar.bz2 -UserAgent "NativeHost"; \
#     $actualsha256 = (Get-FileHash sbcl-source.tar.bz2 -Algorithm sha256).Hash; \
#     Write-Host ('Verifying sha256 {0} (expected: {1})' -f $actualsha256, $env:SBCL_SOURCE_SHA256); \
#     if ($actualsha256 -ne $env:SBCL_SOURCE_SHA256) { \
#         Write-Host 'SHA256 check FAILED!'; \
#         exit 1; \
#     }; \
#     \
#     echo 'Unpacking source'; \
#     sh -c 'tar -x -v -f sbcl-source.tar.bz2'; \
#     rm sbcl-source.tar.bz2; \
#     cd sbcl-$env:SBCL_VERSION; \
#     \
#     echo 'Building SBCL'; \
#     $env:WIX = '/c/wix'; \
#     sh ./make.sh --with-sb-linkable-runtime ; \
#     sh ./make-windows-installer.sh; \
#     cd ..; \
#     \
#     echo 'Removing WIX.'; \
#     rm -r wix; \
#     \
#     echo 'Removing msys2'; \
#     choco uninstall -y msys2; \
#     Remove-Item -Force -Recurse -Path C:\tools; \
#     \
#     echo 'Removing build SBCL'; \
#     choco uninstall -y sbcl; \
#     \
#     echo 'Removing chocolatey'; \
#     Remove-Item -Force -Recurse -Path C:\ProgramData\chocolatey; \
#     $machineKey = [Microsoft.Win32.Registry]::LocalMachine.OpenSubKey('SYSTEM\ControlSet001\Control\Session Manager\Environment\', $true); \
#     $machineKey.SetValue('PATH', $machinePath, 'ExpandString'); \
#     $machineKey.Close(); \
#     [Environment]::SetEnvironmentVariable('ChocolateyInstall', [string]::Empty, 'User'); \
#     [Environment]::SetEnvironmentVariable('ChocolateyInstall', [string]::Empty, 'Machine'); \
#     [Environment]::SetEnvironmentVariable('ChocolateyLastPathUpdate', [string]::Empty, 'User'); \
#     [Environment]::SetEnvironmentVariable('ChocolateyLastPathUpdate', [string]::Empty, 'Machine'); \
#     [Environment]::SetEnvironmentVariable('ChocolateyToolsLocation', [string]::Empty, 'User'); \
#     [Environment]::SetEnvironmentVariable('ChocolateyToolsLocation', [string]::Empty, 'Machine'); \
#     \
#     echo 'Installing SBCL'; \
#     cp C:\sbcl-$env:SBCL_VERSION\output\sbcl-$env:SBCL_VERSION-x86-64-windows-binary.msi sbcl-installer.msi; \
#     Start-Process msiexec.exe -Wait -ArgumentList '/I C:\sbcl-installer.msi'; \
#     echo 'Removing SBCL Source'; \
#     Remove-Item -Force -Recurse -Path C:\sbcl-$env:SBCL_VERSION; \
#     Remove-Item -Force -Path C:\sbcl-installer.msi;
    If (Test-Path 'C:\$Recycle.Bin') { Remove-Item -Force -Recurse -Path 'C:\$Recycle.Bin'; };

CMD ["sbcl"]