Skip to content

Dockerfile for building Jenkins container image.

Notifications You must be signed in to change notification settings

NIXKnight/Docker-Jenkins

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Docker-Jenkins

Dockerfile for Jenkins.

Usage

Build the Docker image as follows:

export JENKINS_LTS_VERSION="$(curl -L http://updates.jenkins-ci.org/stable/latestCore.txt)"
docker build . --file Dockerfile --build-arg JENKINS_VERSION=$JENKINS_LTS_VERSION --build-arg DOCKER_JENKINS_GROUP_ID=$(grep "^docker" /etc/group|cut -d: -f3) --tag jenkins:lts-$JENKINS_LTS_VERSION

Create a Docker volume for Jenkins:

docker volume create jenkins_data

Run the container as follows:

docker run -d --network host --restart=unless-stopped -v jenkins_data:/var/jenkins_home -v /var/run/docker.sock:/var/run/docker.sock --name jenkins jenkins:lts-$JENKINS_LTS_VERSION

After running the container, Jenkins will be available at http://localhost:8080.

License

Licensed under MIT License (See the LICENSE file).

Author

Saad Ali

About

Dockerfile for building Jenkins container image.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published