git-docker/docker/Dockerfile.windows.1803

21 lines
884 B
Docker
Raw Normal View History

# escape=`
FROM mcr.microsoft.com/windows/servercore:1803 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
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
FROM mcr.microsoft.com/powershell:nanoserver-1803
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" ]