Skip to content

Instantly share code, notes, and snippets.

@franzwong
Created November 21, 2022 02:19
Show Gist options
  • Save franzwong/cde3d5f3a6c9c204553533fed91bcd25 to your computer and use it in GitHub Desktop.
Save franzwong/cde3d5f3a6c9c204553533fed91bcd25 to your computer and use it in GitHub Desktop.
Run Jenkins on local machine

Run Jenkins on local machine

Setup

mkdir -p jenkins_local
cd jenkins_local
PROJECT_DIR=$(PWD)
mkdir -p jenkins_home

Run

docker run -u 0 -d \
--name jenkins \
-p 8080:8080 \
-p 50000:50000 \
--restart=on-failure \
-v ${PROJECT_DIR}/jenkins_home:/var/jenkins_home \
-e JAVA_OPTS="-Xmx1024m" \
jenkins/jenkins:lts-jdk11

Web port

URL: http://localhost:8080

Initial password is located at /var/jenkins_home/secrets/initialAdminPassword or you can find it in docker logs jenkins.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment