# docker 安裝 jenkins 步驟 1. 在目錄資料夾下./ 創建一個 jenkins_home目錄 2. docker-compose ``` version: '3.4' services: jenkins: image: jenkins/jenkins:2.249.2-lts container_name: jenkins volumes: - ./jenkins_home:/var/jenkins_home ports: - "8080:8080" - "50000:50000" ``` 3. 打指令 docker-compose up -d , http://localhost:8080 使用docker ## 注意!!! * 如果安裝plugins失敗,檢查./update/default.json裡面的url鏡像源的檔案可不可以下載,不能就更換其他的試試看 可以更換整個json 或是單獨換掉 json: https://mirrors.tuna.tsinghua.edu.cn/jenkins/updates/update-center.json 替代源: https://updates.jenkins.io/download/plugins/ https://mirrors.tuna.tsinghua.edu.cn/jenkins/plugins/ ![](https://i.imgur.com/RwB4S60.png)