Sign inSign up

sergief/java-jenkins-slave

By sergief

Updated about 7 years ago

Jenkins Slave image with JDK8, Maven and M2 Settings to connect to nexus

Image
0

1.1K

sergief/java-jenkins-slave repository overview

Docker Java Jenkins slave

This project contains a Jenkins Slave Docker image that has all the build tools needed for creating Java applications built using Maven and Git as source code repository. It also contains a settings.xml file prepared for deploying and retrieving artifacts to/from Nexus.

Tested using the Jenkins Kubernetes Plugin.

How to use it

You can download the docker image from Docker Hub using the following command:

docker pull sergief/java-jenkins-slave:latest

The following environment variables need to be set in order to properly use Nexus:

  • M2_MIRROR_CENTRAL: The URL for the mirrored maven central repository, like http://nexus.test:8081/repository/maven-public
  • M2_CREDENTIALS_USR: The username used for authenticating to Nexus.
  • M2_CREDENTIALS_PSW: The password used for authenticating to Nexus.
Build your custom image

You can build your custom image and override the following ENV variables from the dockerfile:

  • NEXUS_USERNAME
  • NEXUS_PASSWORD
  • NEXUS_MAVEN_PUBLIC_URL

Tag summary

Content type

Image

Digest

Size

430.7 MB

Last updated

about 7 years ago

docker pull sergief/java-jenkins-slave