docker中安裝Jenkins
阿新 • • 發佈:2018-12-28
reat second 分享圖片 主機ip 創建 latest doc eat and
獲取Jenkins鏡像
docker pull jenkins
創建文件夾
sudo mkdir /home/jenkins_home
修改權限權限
sudo chown -R 1000:1000 /home/jenkins_home
啟動容器
docker run -itd -p 8080:8080 -p 50000:50000 --name jenkins --privileged=true -v /home/jenkins_home:/var/jenkins_home jenkins:latest
啟動後查看:
chen@ubuntu:~$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 6f007ec86071 jenkins:latest"/bin/tini -- /usr..." 5 seconds ago Up 4 seconds 0.0.0.0:8080->8080/tcp, 0.0.0.0:50000->50000/tcp jenkins
容器已經啟動了,訪問一下宿主機ip+8080
docker中安裝Jenkins