Custom image of the official Jenkins LTS image, with Maven and Java 17 installed and pre-configured.
838
This Docker image is based on the official Jenkins LTS image, with Maven and Java 17 installed. It is designed for users who need a ready-to-go Jenkins setup with Maven and Java pre-configured.
# java -version
Output:
openjdk 17.0.12 2024-07-16
OpenJDK Runtime Environment Temurin-17.0.12+7 (build 17.0.12+7)
OpenJDK 64-Bit Server VM Temurin-17.0.12+7 (build 17.0.12+7, mixed mode)
# mvn -v
Output:
Apache Maven 3.8.7
Maven home: /usr/share/maven
Java version: 17.0.12, vendor: Debian, runtime: /usr/lib/jvm/java-17-openjdk-amd64
Default locale: en, platform encoding: UTF-8
OS name: "linux", version: "6.10.3-arch1-2", arch: "amd64", family: "unix"
Running the Jenkins Container
1- Create the directory to store Jenkins data:
mkdir ~/Documents/jenkins
2- To run the Jenkins container using this image, use the following command:
docker run --name jenkins \
-h jenkins-server \
-d -u 1000 \
-p 8080:8080 -p 50000:50000 \
-v ~/Documents/jenkins:/var/jenkins_home:rw \
-v /etc/localtime:/etc/localtime \
morgan404/jenkins-bundle:latest
docker exec -it jenkins cat /var/jenkins_home/secrets/initialAdminPassword
The output
$ docker exec -it jenkins cat /var/jenkins_home/secrets/initialAdminPassword
c46a3af45e8649f1b2a8b2d1ec0ba7bf
The -v ~/Documents/jenkins:/var/jenkins_home:rw option mounts the Jenkins home directory to a location on your host machine. This ensures that Jenkins configuration, jobs, and plugins are stored persistently and will not be lost if the container is stopped or removed.
If you want to build this custom image yourself, you can find the Dockerfile and source code on GitHub, Gitlab
Simply clone the repository and build the image using:
docker build -t my-jenkins:latest .
Content type
Image
Digest
sha256:fd94abd6d…
Size
517 MB
Last updated
about 2 years ago
docker pull morgan404/jenkins-bundle