安装

1
2
3
4
docker container run -p 18080:8080 -p 50000:50000 --name jenkins111 -d jenkins/jenkins:2.164.2-alpine
docker container exec -it jenkins111 /bin/bash
docker container stop jenkins111
docker container rm jenkins111
1
2
3
4
5
6
7
mkdir data
cat > data/log.properties <<EOF
handlers=java.util.logging.ConsoleHandler
jenkins.level=FINEST
java.util.logging.ConsoleHandler.level=FINEST
EOF
docker run --name jenkins667 -p 18080:8080 -p 50000:50000 --env JAVA_OPTS="-Djava.util.logging.config.file=/var/jenkins_home/log.properties" -v `pwd`/data:/var/jenkins_home jenkins/jenkins:lts

参考