Home  >  Q&A  >  body text

怎么在docker中部署jenkins

我先用命令拉镜像

docker pull jenkins

然后运行

mkdir /var/jenkins_home
docker run -d --name myjenkins -p 49001:8080 -v /var/jenkins_home:/var/jenkins_home jenkins  

之后我用命令查看时候开启

docker ps -a 

结果是

显示的status值为exite(1)。

这是什么原因啊?

伊谢尔伦伊谢尔伦2709 days ago528

reply all(1)I'll reply

  • 怪我咯

    怪我咯2017-04-22 09:02:27

    docker run -p 8080:8080 -p 50000:50000 -v /your/home:/var/jenkins_home jenkins
    

    This will store the jenkins data in /your/home on the host. Ensure that /your/home is accessible by the jenkins user in container (jenkins user - uid 1000) or use -u some_other_user parameter with docker run.
    https://hub.docker.com/_/jenkins/

    reply
    0
  • Cancelreply