Skip to content

Commit

Permalink
Merge pull request #95 from Vlatombe/add-git-to-windows-docker-images
Browse files Browse the repository at this point in the history
This adds git to windows docker images to align them more with existing linux images
  • Loading branch information
slide committed Nov 25, 2019
2 parents dde4b44 + c94d13c commit d08f161
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Dockerfile-windows
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@ SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPref
ARG VERSION=3.35
LABEL Description="This is a base image, which provides the Jenkins agent executable (agent.jar)" Vendor="Jenkins project" Version="${VERSION}"

ARG GIT_VERSION=2.24.0
ARG GIT_PATCH_VERSION=2

RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 ; `
Invoke-WebRequest $('https://github.com/git-for-windows/git/releases/download/v{0}.windows.{1}/MinGit-{0}.{1}-busybox-64-bit.zip' -f $env:GIT_VERSION, $env:GIT_PATCH_VERSION) -OutFile 'mingit.zip' -UseBasicParsing ; `
Expand-Archive mingit.zip -DestinationPath c:\mingit ; `
Remove-Item mingit.zip -Force ; `
setx /M PATH $('c:\mingit\cmd;{0}' -f $env:PATH)

ARG user=jenkins

ARG AGENT_FILENAME=agent.jar
Expand Down
9 changes: 9 additions & 0 deletions Dockerfile-windows-jdk11
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@ SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPref
ARG VERSION=3.35
LABEL Description="This is a base image, which provides the Jenkins agent executable (agent.jar)" Vendor="Jenkins project" Version="${VERSION}"

ARG GIT_VERSION=2.24.0
ARG GIT_PATCH_VERSION=2

RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 ; `
Invoke-WebRequest $('https://github.com/git-for-windows/git/releases/download/v{0}.windows.{1}/MinGit-{0}.{1}-busybox-64-bit.zip' -f $env:GIT_VERSION, $env:GIT_PATCH_VERSION) -OutFile 'mingit.zip' -UseBasicParsing ; `
Expand-Archive mingit.zip -DestinationPath c:\mingit ; `
Remove-Item mingit.zip -Force ; `
setx /M PATH $('c:\mingit\cmd;{0}' -f $env:PATH)

ARG user=jenkins

ARG AGENT_FILENAME=agent.jar
Expand Down
9 changes: 9 additions & 0 deletions Dockerfile-windows-nanoserver
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,15 @@ RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tl

ARG JAVA_HOME

ARG GIT_VERSION=2.24.0
ARG GIT_PATCH_VERSION=2

RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 ; `
Invoke-WebRequest $('https://github.com/git-for-windows/git/releases/download/v{0}.windows.{1}/MinGit-{0}.{1}-busybox-64-bit.zip' -f $env:GIT_VERSION, $env:GIT_PATCH_VERSION) -OutFile 'mingit.zip' -UseBasicParsing ; `
Expand-Archive mingit.zip -DestinationPath c:\mingit ; `
Remove-Item mingit.zip -Force ; `
setx /M PATH $('c:\mingit\cmd;{0}' -f $env:PATH)

ARG VERSION=3.35
ARG user=jenkins

Expand Down
9 changes: 9 additions & 0 deletions Dockerfile-windows-nanoserver-jdk11
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,15 @@ RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tl

ARG JAVA_HOME

ARG GIT_VERSION=2.24.0
ARG GIT_PATCH_VERSION=2

RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 ; `
Invoke-WebRequest $('https://github.com/git-for-windows/git/releases/download/v{0}.windows.{1}/MinGit-{0}.{1}-busybox-64-bit.zip' -f $env:GIT_VERSION, $env:GIT_PATCH_VERSION) -OutFile 'mingit.zip' -UseBasicParsing ; `
Expand-Archive mingit.zip -DestinationPath c:\mingit ; `
Remove-Item mingit.zip -Force ; `
setx /M PATH $('c:\mingit\cmd;{0}' -f $env:PATH)

ARG VERSION=3.35
ARG user=jenkins

Expand Down

0 comments on commit d08f161

Please sign in to comment.