标签:触发器 art 开发者选项 root conf 软件 idg inf init
$ cat Dockerfile
FROM jenkins/jenkins:lts
USER root
RUN groupadd -g 999 docker
RUN gpasswd -a jenkins docker
USER jenkins
docker build -f ./Dockerfile -t jenkins/jenkins:lts-v1.0 .
$ cat docker-compose-jenkins.yml
version: "2.2"
services:
jenkins:
image: jenkins/jenkins:lts-v1.0
ports:
- "9090:8080"
- "50000:50000"
volumes:
- /datafile/jenkins/home:/var/jenkins_home
- /var/run/docker.sock:/var/run/docker.sock
- /etc/timezone:/etc/timezone
- /etc/localtime:/etc/localtime
- /usr/bin/docker:/usr/bin/docker
mem_limit: 8g
restart: always
networks:
- monitoring
networks:
monitoring:
driver: bridge
docker-compose -f docker-compose-jenkins.yml up -d
http://IP:9090/
$ cat /var/jenkins_home/secrets/initialAdminPassword
b68e123s4f9bc54f3a9e0ec6ss12aea851
MyGitDir
└── test
├── 1.txt
├── Dockerfile
└── nginx_test
├── nginx.conf
└── test.txt
Git修改代码,进行push操作
git add 1.txt
git commit -m "zongxiang test"
git push
至此,结束
Jenkins + Coding 构建 Docker Image 并自动上传至Docker Registry
标签:触发器 art 开发者选项 root conf 软件 idg inf init
原文地址:https://www.cnblogs.com/zongxiang/p/14770075.html