From cb0fb526264f40dbe75387668112c2cf28885b08 Mon Sep 17 00:00:00 2001 From: Daniel Fiala Date: Tue, 3 Sep 2024 12:15:57 +0200 Subject: [PATCH] Removed old windows template --- Dockerfile-win.template | 51 ----------------------------------------- 1 file changed, 51 deletions(-) delete mode 100644 Dockerfile-win.template diff --git a/Dockerfile-win.template b/Dockerfile-win.template deleted file mode 100644 index f4d412447..000000000 --- a/Dockerfile-win.template +++ /dev/null @@ -1,51 +0,0 @@ -FROM mcr.microsoft.com/windows/servercore:version - -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:\nodejs;{0}\Yarn\bin;{1}' -f $env:LOCALAPPDATA, $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 NODE_VERSION 0.0.0 -ENV NODE_CHECKSUM CHECKSUM_x64 - -RUN $url = ('https://nodejs.org/dist/v{0}/node-v{0}-win-x64.zip' -f $env:NODE_VERSION); \ - Write-Host ('Downloading {0} ...' -f $url); \ - Invoke-WebRequest -Uri $url -OutFile 'node.zip'; \ - \ - Write-Host ('Verifying sha256 ({0}) ...' -f $env:NODE_CHECKSUM); \ - if ((Get-FileHash node.zip -Algorithm sha256).Hash -ne $env:NODE_CHECKSUM) { throw 'SHA256 mismatch' }; \ - \ - Write-Host 'Expanding ...'; \ - Expand-Archive node.zip -DestinationPath C:\; \ - \ - Write-Host 'Renaming ...'; \ - Rename-Item -Path ('C:\node-v{0}-win-x64' -f $env:NODE_VERSION) -NewName 'C:\nodejs'; \ - \ - Write-Host 'Removing ...'; \ - Remove-Item node.zip -Force; \ - \ - Write-Host 'Verifying ("node --version") ...'; \ - node --version; \ - Write-Host 'Verifying ("npm --version") ...'; \ - npm --version; \ - \ - Write-Host 'Complete.' - -ENV YARN_VERSION 0.0.0 - -# "It is recommended to install Yarn through the npm package manager" (https://classic.yarnpkg.com/en/docs/install) -RUN Write-Host 'Installing "yarn" ...'; \ - npm install --global ('yarn@{0}' -f $env:YARN_VERSION); \ - \ - Write-Host 'Verifying ("yarn --version") ...'; \ - yarn --version; \ - \ - Write-Host 'Complete.' - -COPY docker-entrypoint.ps1 C:/docker-entrypoint.ps1 -ENTRYPOINT [ "powershell.exe" , "C:/docker-entrypoint.ps1" ] - -CMD [ "node.exe" ] \ No newline at end of file