Skip to content

Commit f4f3e4e

Browse files
Merge pull request #95 from pennywisdom/check-gitsha
bumping git version and adding hash validation
2 parents da97587 + 88e9993 commit f4f3e4e

3 files changed

Lines changed: 7 additions & 5 deletions

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 ...'; \

golang/build.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
docker build -t golang .
22
if %errorlevel% neq 0 exit /b %errorlevel%
3-
docker tag golang:latest golang:1.8beta2
3+
docker tag golang:latest golang:1.8

golang/push.bat

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
docker tag golang:1.8beta2 stefanscherer/golang-windows:1.8beta2
2-
docker tag golang:1.8beta2 stefanscherer/golang-windows
3-
docker push stefanscherer/golang-windows:1.8beta2
1+
docker tag golang:1.8 stefanscherer/golang-windows:1.8
2+
docker tag golang:1.8 stefanscherer/golang-windows
3+
docker push stefanscherer/golang-windows:1.8
44
docker push stefanscherer/golang-windows

0 commit comments

Comments
 (0)