Skip to content

Commit 8bb25b5

Browse files
committed
bumping git version and adding hash validation
1 parent da97587 commit 8bb25b5

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

golang/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@ FROM golang:1.8-nanoserver
22

33
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
44

5-
ENV GIT_VERSION 2.11.0
5+
ENV GIT_VERSION 2.12.0
66
ENV GIT_DOWNLOAD_URL https://github.com/git-for-windows/git/releases/download/v${GIT_VERSION}.windows.1/MinGit-${GIT_VERSION}-64-bit.zip
7+
ENV GIT_SHA256 6238f65c4d8412b993cb092efde4954f8cb7da4def54d0c1533835f00e83fdad
78

89
RUN Invoke-WebRequest -UseBasicParsing $env:GIT_DOWNLOAD_URL -OutFile git.zip; \
10+
if ((Get-FileHash git.zip -Algorithm sha256).Hash -ne $env:GIT_SHA256) {exit 1} ; \
911
Expand-Archive git.zip -DestinationPath C:\git; \
1012
Remove-Item git.zip; \
1113
Write-Host 'Updating PATH ...'; \

0 commit comments

Comments
 (0)