jenkins官方
sudo docker run --name jenkins \
-p 8080:8080 -p 50000:50000 -u root -d \
--env JAVA_OPTS="-Xms256m -Xmx512m -XX:MaxNewSize=256m" \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /usr/bin/docker:/usr/bin/docker \
-v $PWD/jenkins_home:/var/jenkins_home \
jenkins
alpine
- 无docker
sudo docker run --name jenkins \
-p 8080:8080 -p 50000:50000 -u root -d \
--env JAVA_OPTS="-Xms256m -Xmx512m -XX:MaxNewSize=256m" \
-v $PWD/jenkins_home:/var/jenkins_home \
--privileged=true \
manycoding/jenkins-python
- docker
sudo docker run --name jenkins \
-p 8080:8080 -p 50000:50000 -u root -d \
--env JAVA_OPTS="-Xms256m -Xmx512m -XX:MaxNewSize=256m" \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /usr/bin/docker:/usr/bin/docker \
-v $PWD/jenkins_home:/var/jenkins_home \
--privileged=true \
manycoding/jenkins-python
ubuntu:
- 测试 无端口 退出删除
sudo docker run --name jenkins-test --rm -it \
--env JAVA_OPTS="-Xms256m -Xmx512m -XX:MaxNewSize=256m" \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /usr/bin/docker:/usr/bin/docker \
-v $PWD/jenkins_home:/var/jenkins_home \
--privileged=true \
tgamauf/jenkins-python3 /bin/bash
- docker
sudo docker run --name jenkins \
-p 8080:8080 -p 50000:50000 -u root -d \
--env JAVA_OPTS="-Xms256m -Xmx512m -XX:MaxNewSize=256m" \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /usr/bin/docker:/usr/bin/docker \
-v $PWD/jenkins_home:/var/jenkins_home \
--privileged=true \
tgamauf/jenkins-python3
exec
进去后需要
apt-get install -y libltdl7
最新
docker run \
-u root \
--rm \
--name jenkins \
-d \
-e JAVA_OPTS=-Dhudson.security.csrf.GlobalCrumbIssuerConfiguration.DISABLE_CSRF_PROTECTION=true \
-p 8080:8080 \
-p 50000:50000 \
-v /var/jenkins_home/:/var/jenkins_home \
-v /var/run/docker.sock:/var/run/docker.sock \
jenkinsci/blueocean