github.com/secure-build/gitlab-runner@v12.5.0+incompatible/dockerfiles/build/Dockerfile.x86_64_servercore1803 (about) 1 # escape=` 2 3 FROM mcr.microsoft.com/windows/servercore:1803 as builder 4 5 SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] 6 7 ARG GIT_VERSION 8 ARG GIT_VERSION_BUILD 9 ARG GIT_256_CHECKSUM 10 ARG GIT_LFS_VERSION 11 ARG GIT_LFS_256_CHECKSUM 12 13 # We have to enable TLS1.2 to download from GitHub. 14 RUN [Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12; ` 15 Invoke-Webrequest "https://github.com/git-for-windows/git/releases/download/v${Env:GIT_VERSION}.windows.${Env:GIT_VERSION_BUILD}/MinGit-${Env:GIT_VERSION}-64-bit.zip" -OutFile git.zip -UseBasicParsing; ` 16 Invoke-Webrequest "https://github.com/git-lfs/git-lfs/releases/download/v${Env:GIT_LFS_VERSION}/git-lfs-windows-amd64-v${Env:GIT_LFS_VERSION}.zip" -OutFile git-lfs.zip -UseBasicParsing 17 18 COPY [".\\helpers\\checksum.ps1", ".\\"] 19 RUN powershell -File .\checksum.ps1 -TargetFile git.zip -ExpectedHash ${Env:GIT_256_CHECKSUM} 20 RUN powershell -File .\checksum.ps1 -TargetFile git-lfs.zip -ExpectedHash ${Env:GIT_LFS_256_CHECKSUM} 21 22 RUN Expand-Archive -Path git.zip -DestinationPath git 23 RUN Expand-Archive -Path git-lfs.zip -DestinationPath git-lfs 24 25 FROM mcr.microsoft.com/windows/servercore:1803 26 27 USER ContainerAdministrator 28 29 COPY --from=builder ["git", "C:\\Program Files\\git"] 30 COPY --from=builder ["git-lfs", "C:\\Program Files\\git-lfs"] 31 RUN setx PATH "%PATH%;C:\Program Files\git\cmd;C:\Program Files\git-lfs;C:\Program Files\gitlab-runner-helper" /M 32 33 RUN git config --system core.longpaths true 34 RUN git lfs install --skip-repo 35 36 COPY [".\\binaries\\gitlab-runner-helper.x86_64-windows.exe", "C:\\Program Files\\gitlab-runner-helper\\gitlab-runner-helper.exe"]