Docker之Jekins安装配置

Jenkins(tag:lts)

#1.拉取Jenkins镜像
docker pull jenkins/jenkins:lts

#2.创建外部目录
mkdir -p /home/jenkins/data  #存放配置

#3.启动镜像
docker run \
  -u root \
  -d \
  -p 8080:8080 \
  -p 50000:50000 \
  -v /home/jenkins/data:/var/jenkins_home \
  -v /var/run/docker.sock:/var/run/docker.sock \
  --name jenkins \
  jenkins/jenkins:lts

#4.查看密码
cat jenkins/data/secrets/initialAdminPassword

帮助文档

你可能感兴趣的:(Docker,docker,centos,jenkens)