1、部署启动脚本:
[root@node10 docker-data]# cat start.sh docker run -d \ --restart=unless-stopped \ -v /opt/docker-data/jenkins28080/jenkins_home:/var/jenkins_home \ -v /etc/localtime:/etc/localtime \ --name my-jenkins2 \ -p 28080:8080 \ -e JAVA_OPTS='-Dorg.apache.commons.jelly.tags.fmt.timeZone=Asia/Shanghai' jenkins/jenkins:lts
温馨提示:
如果启动不起来,进行赋权: chown -R 1000:1000 /opt/docker-data/jenkins28080/