10 docker安装jenkins
作者:互联网
目录地址 /opt/docker/jenkins/
- 创建start_jenkins.sh
#!/bin/bash
docker run --name jenkins -u root --rm -d -p 7005:8080 -p 50000:50000 -v /opt/docker/jenkins/data:/var/jenkins_home jenkinsci/blueocean:1.24.8
- 加执行权限并执行
chmod +x start_jenkins.sh
./start_jenkins.sh
- 安装完成
配置域名
jk.msh.com IN A 192.168.70.11
nginx配置
server {
listen 80;
server_name jk.msh.com;
location / {
proxy_pass http://192.168.70.11:7005/;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
cat /opt/docker/jenkins/data/secrets/initialAdminPassword
填入密钥
不是很熟悉jenkins的建议使用推荐插件
标签:10,set,header,proxy,jk,jenkins,docker 来源: https://blog.csdn.net/weixin_43817918/article/details/121540628