From 2273415ec93295843f7aebdf3f0fb0c5f39834e6 Mon Sep 17 00:00:00 2001 From: Arve Knudsen Date: Thu, 29 Oct 2020 09:53:08 +0100 Subject: [PATCH] Disable auto line ending conversion in Windows Dockerfiles Signed-off-by: Arve Knudsen --- docker/Dockerfile.windows.1803 | 1 + docker/Dockerfile.windows.1809 | 1 + docker/Dockerfile.windows.1903 | 1 + docker/Dockerfile.windows.1909 | 1 + 4 files changed, 4 insertions(+) diff --git a/docker/Dockerfile.windows.1803 b/docker/Dockerfile.windows.1803 index cbd58a7..9b9b21c 100644 --- a/docker/Dockerfile.windows.1803 +++ b/docker/Dockerfile.windows.1803 @@ -6,6 +6,7 @@ SHELL ["powershell.exe", "-Command", "$ErrorActionPreference = 'Stop'; $Progress 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; +RUN C:\git\cmd\git.exe config --system core.autocrlf false FROM mcr.microsoft.com/powershell:nanoserver-1803 COPY --from=git /git /git diff --git a/docker/Dockerfile.windows.1809 b/docker/Dockerfile.windows.1809 index 936400d..a2c49cf 100644 --- a/docker/Dockerfile.windows.1809 +++ b/docker/Dockerfile.windows.1809 @@ -6,6 +6,7 @@ SHELL ["powershell.exe", "-Command", "$ErrorActionPreference = 'Stop'; $Progress 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; +RUN C:\git\cmd\git.exe config --system core.autocrlf false FROM mcr.microsoft.com/powershell:nanoserver-1809 COPY --from=git /git /git diff --git a/docker/Dockerfile.windows.1903 b/docker/Dockerfile.windows.1903 index 71982da..d15f5c3 100644 --- a/docker/Dockerfile.windows.1903 +++ b/docker/Dockerfile.windows.1903 @@ -6,6 +6,7 @@ SHELL ["powershell.exe", "-Command", "$ErrorActionPreference = 'Stop'; $Progress 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; +RUN C:\git\cmd\git.exe config --system core.autocrlf false FROM mcr.microsoft.com/powershell:nanoserver-1903 COPY --from=git /git /git diff --git a/docker/Dockerfile.windows.1909 b/docker/Dockerfile.windows.1909 index 7e53708..20cd4fd 100644 --- a/docker/Dockerfile.windows.1909 +++ b/docker/Dockerfile.windows.1909 @@ -6,6 +6,7 @@ SHELL ["powershell.exe", "-Command", "$ErrorActionPreference = 'Stop'; $Progress 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; +RUN C:\git\cmd\git.exe config --system core.autocrlf false FROM mcr.microsoft.com/powershell:nanoserver-1909 COPY --from=git /git /git