简体   繁体   English

在Docker容器中运行Jenkins

[英]Running Jenkins in a Docker Container

Im trying to get some hands on experience in Jenkins and wanted to run it in a docker container. 我试图获得有关Jenkins的经验,并希望在docker容器中运行它。 I was following the tutorial here . 我在这里关注教程。 I have docker installed on my machine and using Kitematic I launched the official Jenkins docker image (tag: latest) using: 我已经在我的机器上安装了docker,并使用Kitematic我使用以下命令启动了官方的Jenkins docker镜像(标签:最新)。

docker run -p 8080:8080 jenkins

However once the container is setup when I go to 192.168.99.100:8080 ( 192.168.99.100 is my docker-machine ip) it shows the default nginx page. 然而,一旦容器设置,当我去192.168.99.100:8080192.168.99.100是我的泊坞窗机IP),它显示了默认nginx页面。 192.168.99.100:8080/jenkins shows 192.168.99.100:8080/jenkins节目

HTTP ERROR 404

Problem accessing /jenkins. Reason:

    Not Found

The weird part is that kitmatic shows a web preview of the running container and shows jenkins up and running fine, but how do I access it via the browser???? 奇怪的是,kitmatic可以显示正在运行的容器的Web预览,并可以显示jenkins正常运行,但是如何通过浏览器访问它呢? 在此处输入图片说明

EDIT : Just tried docker run -p 8082:8080 jenkins. 编辑:刚刚尝试了docker run -p 8082:8080 jenkins。 and it works ie I can see the jenkins landing page. 它的工作原理,即我可以看到詹金斯着陆页。 Whaaaa.. ? Whaaaa ..?

See if the port 8080 is already taken by another application. 查看端口8080是否已被另一个应用程序占用。 it's not allocating this port because it's taken - that is why it can't reach Jenkins. 它没有分配该端口,因为它已被占用-这就是为什么它无法到达Jenkins的原因。 try looking here: https://www.cyberciti.biz/tips/linux-display-open-ports-owner.html 尝试在这里查看: https : //www.cyberciti.biz/tips/linux-display-open-ports-owner.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM