1、下载jdk1.8
scp root@106.12.199.141:/home/jdk-8u231-linux-x64.tar.gz /home
2、下载docker
wget https://download.docker.com/linux/centos/7/x86_64/stable/Packages/docker-ce-18.06.3.ce-3.el7.x86_64.rpm
3、安装docker
yum localinstall docker-ce-18.06.3.ce-3.el7.x86_64.rpm
4、启动docker
systemctl start docker
5、进入docker文件夹
cd /etc/docker
6、创建daemon.json文件
touch daemon.json
7、编辑daemon.json文件
vi daemon.json
8、重新启动docker
systemctl restart docker
9、docker下安装jenkins
docker pull jenkins
10、进入home
cd /home
11、在home下建立jenkins子目录
mkdir jenkins
12、启动jenkins
docker run -itd -p 8080:8080 -p 50000:50000 --name jenkins --privileged=true -v /home/var/jenkins:/home/jenkins jenkins
原文:https://www.cnblogs.com/zihkj/p/12944059.html