Heim  >  Fragen und Antworten  >  Hauptteil

怎么在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)。

这是什么原因啊?

伊谢尔伦伊谢尔伦2760 Tage vor560

Antworte allen(1)Ich werde antworten

  • 怪我咯

    怪我咯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/

    Antwort
    0
  • StornierenAntwort