git-docker/docker/Dockerfile.windows.1709

21 lines
916 B
Docker
Raw Normal View History

2018-09-11 18:19:04 +00:00
FROM microsoft/windowsservercore:1709 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 ; \
2018-09-11 23:06:41 +00:00
Invoke-WebRequest -UseBasicParsing https://github.com/git-for-windows/git/releases/download/v2.19.0-rc2.windows.1/MinGit-2.19.0.rc2.windows.1-64-bit.zip -OutFile git.zip; \
Expand-Archive git.zip -DestinationPath C:\git
2018-09-11 18:19:04 +00:00
2018-09-12 00:03:58 +00:00
FROM microsoft/powershell:nanoserver-1709
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"
2018-09-12 01:25:27 +00:00
ENV HOME C:\\Users\\ContainerAdministrator
2018-09-12 00:03:58 +00:00
SHELL ["pwsh", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
CMD [ "pwsh", "C:\\bin\\clone.ps1" ]