2019-03-15 22:12:21 +00:00
|
|
|
# escape=`
|
|
|
|
|
2023-01-04 12:06:51 +00:00
|
|
|
FROM mcr.microsoft.com/windows/servercore:ltsc2022 AS git
|
2018-09-11 23:06:41 +00:00
|
|
|
SHELL ["powershell.exe", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
|
2018-09-11 18:19:04 +00:00
|
|
|
|
2019-03-15 22:12:21 +00:00
|
|
|
RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 ; `
|
|
|
|
Invoke-WebRequest -UseBasicParsing https://github.com/git-for-windows/git/releases/download/v2.21.0.windows.1/MinGit-2.21.0-64-bit.zip -OutFile git.zip; `
|
|
|
|
Expand-Archive git.zip -DestinationPath C:\git;
|
2018-09-11 18:19:04 +00:00
|
|
|
|
2023-01-04 10:25:17 +00:00
|
|
|
FROM mcr.microsoft.com/powershell:nanoserver-ltsc2022
|
2018-09-11 18:19:04 +00:00
|
|
|
COPY --from=git /git /git
|
|
|
|
|
2018-09-11 23:06:41 +00:00
|
|
|
ADD windows/* /bin/
|
2018-09-11 18:19:04 +00:00
|
|
|
|
2018-09-12 00:03:58 +00:00
|
|
|
# https://github.com/PowerShell/PowerShell/issues/6211#issuecomment-367477137
|
|
|
|
USER ContainerAdministrator
|
|
|
|
RUN setx /M PATH "%PATH%;C:\Program Files\PowerShell"
|
|
|
|
|
|
|
|
SHELL ["pwsh", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
|
|
|
|
CMD [ "pwsh", "C:\\bin\\clone.ps1" ]
|