Skip to content

Instantly share code, notes, and snippets.

@KangDroid
Created March 6, 2021 15:31
Show Gist options
  • Save KangDroid/41abf1b7a064528cadfd54514c23fe74 to your computer and use it in GitHub Desktop.
Save KangDroid/41abf1b7a064528cadfd54514c23fe74 to your computer and use it in GitHub Desktop.
A Dockerfile for Windows LTSC 2019
FROM mcr.microsoft.com/windows/servercore:ltsc2019
RUN powershell (new-object System.Net.WebClient).Downloadfile('https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u282-b08/OpenJDK8U-jdk_x64_windows_hotspot_8u282b08.msi', 'C:\jre-8u91-windows-x64.msi')
RUN powershell (new-object System.Net.WebClient).Downloadfile('https://github.com/git-for-windows/git/releases/download/v2.30.1.windows.1/MinGit-2.30.1-64-bit.zip', 'C:\git.zip')
RUN powershell Expand-Archive 'C:\git.zip' -DestinationPath 'C:\git'
RUN powershell $env:PATH = 'C:\git\cmd;C:\git\mingw64\bin;C:\git\usr\bin;{0}' -f $env:PATH ; \
[Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine)
RUN powershell msiexec.exe /i 'C:\jre-8u91-windows-x64.msi' INSTALLLEVEL=3 /quiet
CMD ["powershell"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment