docker run \ -p 8090:8080 \ -p 50000:50000 \ --name my-jenkins \ -e TZ="Asia/Shanghai" \ -v /home/jenkins:/var/jenkins_home \ -u 0 \ -d jenkins/jenkins:lts-jdk11
# nginx反向代码的容器启动 docker run \ -p 8180:8080 \ -p 5100:5000 \ --restart=always \ -e TZ=“Asia/Shanghai” \ -e JENKINS_OPTS="--prefix=/jenkins" \ -e JENKINS_ARGS="--prefix=/jenkins" \ # 注意这里的data目录要给写权限,不然启动会报错,要么以root启动 -u root -v /all/docker_volume/jenkins/data:/var/jenkins_home \ --name jenkins_jdk11 \ -d jenkins/jenkins:jdk11