This is a fully functional Jenkins server which runs in an alpine linux with docker
278
This is a fully functional Jenkins server which runs in an alpine linux that is ready out of the box to build pipelines and comes with the blue ocean plugin.
Creating and running jenkins with docker image.
Run Jenkins in Docker:
docker run -p 8080:8080 ako74programmer/jenkins-docker
To allow Jenkins to utilize your host Docker installation for spinning up containers in builds and building images, mount the Docker socket as a volume.
docker run --name jenkins17 -d \
-v /var/run/docker.sock:/var/run/docker.sock \
-v jenkins_home:/data \
-p 8080:8080 ako74programmer/jenkins-docker:202211-lts
Log into Jenkins at http://localhost:8080 with admin/admin.
pipeline {
agent {
docker {
image 'maven:3-openjdk-18-slim'
args '-v $HOME/.m2:/root/.m2'
args '--entrypoint=""'
}
}
stages {
stage('Test') {
steps {
sh 'mvn --version'
sh 'java --version'
}
}
}
}
Content type
Image
Digest
sha256:5a616be43…
Size
372.7 MB
Last updated
almost 4 years ago
docker pull ako74programmer/jenkins-docker