运行jenkins

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
sudo docker run \
  --name jenkins-blueocean \
  --env TZ='Asia/Shanghai' \
  -u root \
  -d \
  -p 8080:8080 \
  -p 50000:50000 \
  --restart always \
  -v /data/jenkins_home:/var/jenkins_home \
  -v /var/run/docker.sock:/var/run/docker.sock \
  jenkinsci/blueocean

sudo docker exec jenkins-blueocean cat /var/jenkins_home/secrets/initialAdminPassword

安装插件

Publish Over SSH

https://plugins.jenkins.io/publish-over-ssh/