---
# System prepended metadata

title: 透過docker image來安裝 Jenkins server_紀錄
tags: [Docker_image]

---

透過docker image來安裝 Jenkins server_紀錄
===
###### tags: `Docker_image`



link: https://hub.docker.com/r/jenkins/jenkins
![](https://hackmd.io/_uploads/BJYAMY5kT.png)
link: https://github.com/jenkinsci/docker/blob/master/README.md
![](https://hackmd.io/_uploads/HJ2rQK5Jp.png)
啟動container把這個docker image丟進去跑 在背景執行 創建一個jenkins_home的volume把它mapping到container底下的這個路徑/var/jenkins_home 兩個port mapping
```dockerfile
docker run -d -v jenkins_home:/var/jenkins_home -p 8080:8080 -p 50000:50000 --restart=on-failure jenkins/jenkins:lts-jdk11
```
![](https://hackmd.io/_uploads/SkDhmYqy6.png)
第一次登入密碼
![](https://hackmd.io/_uploads/HkWYNtcJa.png)

![](https://hackmd.io/_uploads/SJbOJtqkT.png)
![](https://hackmd.io/_uploads/H1DHZFc16.png)
