Sign inSign up

matt9ucci/jenkins-powershell

By matt9ucci

•Updated over 3 years ago

Jenkins + PowerShell

Image
1

1.2K

matt9ucci/jenkins-powershell repository overview

⁠Jenkins + PowerShell Dockerfile

To make it easy to start PowerShell scripting in Jenkins Pipeline.

Based on Jenkins official image⁠. Installed PowerShell⁠ from Microsoft’s repository.

⁠Background

On July 2017, Microsoft PowerShell support for Jenkins Pipeline was announced⁠. However, Jenkins official image does not contain PowerShell.

⁠Usage

⁠Build

LTS

docker build --tag jenkins-powershell:lts .

Specific Version

docker build --tag jenkins-powershell:2.73.2 --build-arg jenkins_tag=2.73.2 .
⁠Run

LTS, ephemeral

docker run -d -p 8080:8080 -p 50000:50000 --rm matt9ucci/jenkins-powershell:lts

LTS with volume

docker run -d -p 8080:8080 -p 50000:50000 --name jenkins-ps -v jenkins_home:/var/jenkins_home matt9ucci/jenkins-powershell:lts

Jenkins version

docker run --rm matt9ucci/jenkins-powershell:lts --version
⁠Take advantage of the features of base imagae

All the features available in the Jenkins official image is also available in this image.

The following example runs an LTS ephemeral container passing JAVA_OPTS for skipping the initial setup wizard:

docker run -d -p 8080:8080 -p 50000:50000 --rm --env JAVA_OPTS=-Djenkins.install.runSetupWizard=false matt9ucci/jenkins-powershell:lts

For more information, see the following documents:

Tag summary

Content type

Image

Digest

sha256:2c49b2f8f…

Size

363.5 MB

Last updated

over 3 years ago

docker pull matt9ucci/jenkins-powershell