use nanoserver as base

This commit is contained in:
Brad Rydzewski 2018-09-11 17:03:58 -07:00
parent 7fcace7751
commit 35202805d9
2 changed files with 14 additions and 6 deletions

View File

@ -5,10 +5,14 @@ RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tl
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; \ 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 Expand-Archive git.zip -DestinationPath C:\git
FROM microsoft/windowsservercore:1709 FROM microsoft/powershell:nanoserver-1709
COPY --from=git /git /git COPY --from=git /git /git
ADD windows/* /bin/ ADD windows/* /bin/
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] # https://github.com/PowerShell/PowerShell/issues/6211#issuecomment-367477137
CMD [ "powershell", "C:\\bin\\clone.ps1" ] USER ContainerAdministrator
RUN setx /M PATH "%PATH%;C:\Program Files\PowerShell"
SHELL ["pwsh", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
CMD [ "pwsh", "C:\\bin\\clone.ps1" ]

View File

@ -5,10 +5,14 @@ RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tl
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; \ 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 Expand-Archive git.zip -DestinationPath C:\git
FROM microsoft/windowsservercore:1803 FROM microsoft/powershell:nanoserver-1803
COPY --from=git /git /git COPY --from=git /git /git
ADD windows/* /bin/ ADD windows/* /bin/
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] # https://github.com/PowerShell/PowerShell/issues/6211#issuecomment-367477137
CMD [ "powershell", "C:\\bin\\clone.ps1" ] USER ContainerAdministrator
RUN setx /M PATH "%PATH%;C:\Program Files\PowerShell"
SHELL ["pwsh", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
CMD [ "pwsh", "C:\\bin\\clone.ps1" ]