Ubuntu 20.04 LTS搭建jenkins
1、docker 安装
apt install curl
curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun
2、用docker创建Jenkins
docker pull jenkins/jenkins:lts
mkdir -p /mydata
mkdir -p /mydata/jenkins_home
docker ps
chown -R 1000 /mydata/jenkins_home/
docker run -di --name=jenkins -p 8080:8080 -v /mydata/jenkins_home/:/var/jenkins_home jenkins/jenkins:lts
docker rm jenkins
docker logs jenkins #查看密码
3、登录实用并配置
访问jenkins:https://192.168.146.128:8080(IP为服务器的IP)
默认安装插件