超!超!超简单,Linux安装Docker
1、安装依赖
yum-util 提供yum-config-manager功能,另外两个是devicemapper驱动依赖的
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
2、设置yum源
#中央仓库 sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo #阿里仓库 sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
3、查看仓库中所有Docker版本
sudo yum list docker-ce --showduplicates | sort -r
4、安装Docker
# 默认安装
sudo yum -y install docker-ce
5、启动, 加入开机启动
#启动
sudo systemctl start docker
#加入开机启动
sudo systemctl enable docker
#重启
sudo systemctl restart docker
#关闭
sudo systemctl stop docker
6、验证是否安装成功
sudo docker version
7、添加GitLab Runner官方仓库
curl -L https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.rpm.sh | sudo bash
8、安装最新版本GitLab Runner
sudo yum install gitlab-runner
9、给 gitlab-runner 执行sudo权限
## Allow root to run any commands anywhere root ALL=(ALL) ALL gitlab-runner ALL=(ALL) NOPASSWD:ALL
10、注册Runner、部署Java项目看这里:https://www.cnblogs.com/linnuo/p/14981547.html
Over~ Over~