前因后果
最近工作不忙,研究一下自动化打包,要实现的目标是通过jenkins自动打包,拷贝到指定目录
目标
git更新了代码,jenkins自动打包部署
第一部 安装jenkins
看了一下文档jenkins竟然需要Docker安装....惊呆了🤯
安装Docker
安装依赖包
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
添加docker-ce yum仓库
用的阿里的源
sudo yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
报错:
已加载插件:fastestmirror
adding repo from: http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
grabbing file http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo to /etc/yum.repos.d/docker-ce.repo
http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 416 Requested Range Not Satisfiable"
尝试其他镜像。
Could not fetch/save url http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo to file /etc/yum.repos.d/docker-ce.repo: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 416 Requested Range Not Satisfiable"
查了一下 有说改源的,有改配置文件的,其实是在:/etc/yum.repos.d下发现已经有了一个docker-ce.repo 文件 删掉就可以了
然后继续报错 ,缺少一堆包,
踩坑记,一定要先查看自己系统的版本,我们的版本是CentOS6.8 新的版本需要的是CentOS 7 至于我们运维为什么装这么老的系统不得而知,我感觉后边还要坑我
CentOS6.8 上安装docker
yum install docker-io
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
epel/metalink | 6.2 kB 00:00
* base: mirrors.aliyun.com
* epel: mirrors.ustc.edu.cn
* extras: mirrors.aliyun.com
* updates: mirrors.sohu.com
epel | 4.3 kB 00:00
epel/primary_db | 5.9 MB 00:01
Resolving Dependencies
--> Running transaction check
---> Package dock