标签:拉取 usr 新版本 config iptable libs plugin over -name
序题记:搞定了就是故事,搞不定就是事故。
条件有限,开局只有一台开发机,要跑5套子系统组成的项目群。还要有一些辅助和验证的系统要跑在这上面。从配置来看,要想顺畅开心地完成项目群基础环境支撑,考虑引入资源消耗 1/200 的神器 Docker:更难得是丝毫不用担心环境污染、版本冲突、以及突然开发服务器搞崩溃了;
实际上可能要跑的系统和辅助系统远超预计
申请的是 4C/8G 的 PC server,后来查命令是 1C/2G,10G 空间,果断申请扩容了
边干边写:整了四周;期间无数次崩溃,还要应对乙方内部的质疑,不知道自己是如何坚持下来的
第一周折腾无实质交付
第二周换 Redhad7.2 镜像
第三周寄希望于甲方提供的内网源
第四周重整旗鼓
再三协调之后,放弃等待甲方老师的支援。决定还是自己搞。不就是一些一级依赖么,补全就是!
主要是我方火力太猛:
自力更生,艰苦奋斗!
最近在看一行禅师的《佛陀传》,希望能从中汲取心灵的力量。《天龙八部》里扫地僧也曾说过:
只有佛法越高,慈悲之念越盛,武功绝技才能练得越我
或许我辈须工作中修行,也是这个道理!
对,就是采坑。以下是从草稿中摘取的部分尝试:
编号 | 容器 |
---|---|
1 | docker run -it –name dc7 ailyfeng/centos7.2.1511 /bin/bash |
2 | docker run -it –name dc88 sssllc/centos7.2-jdk1.8 /bin/bash |
3 | docker run -it –name ct7 centos /bin/bash |
4 | docker run -it –privileged –name dc99 sssllc/centos7.2-jdk1.8 |
5 | docker build –rm -t centos:systemd . && docker run -it –name dr7 centos:systemd |
6 | docker run -it –name dr18 yjjy0921/redhat7.2 /bin/bash |
几个搞定依赖包的有用命令
ldd 应该是 linux 通用的命令;rpm 和 repotrack 貌似是 CentoOS 的专有命令;
编号 | 命令 | 举例 | 作用 |
---|---|---|---|
1 | ldd | ldd wkhtmltopdf not found | 就是对应的依赖包不存在,适用于二进制包(wkhtmltopdf)的命令;而需要安装的命令(docker-ce)只能通过安装报错来捕获缺失的依赖了 |
2 | rpm -ql | rpm -ql docker-ce | 查看安装的时候有哪些命令在PATH下,用这些命令去启动 |
3 | repotrack | repotrack -a x86_64 -p /usr/local/yumrepo libgudev1 | 打包下载指定架构(X86_63)所有的依赖到指定目录 |
要安装 Docker 基础环境,必须满足:
[root@pms tmp] uname -r
3.10.0-327.e17.x86_64
[root@pms tmp] ls -l /sys/class/misc/device-mapper
lrwxrwxrwx. 1 root root 0 May 20 16:17 /sys/class/misc/device-mapper -> ../../devices/virtual/misc/device-mapper
MacBook 上,起 CentOS7.2 容器,来验证思路;
拉取镜像,创建 repo 目录
hinaDreams:~ kangcunhua$ docker run -it --name dc88 sssllc/centos7.2-jdk1.8 /bin/bash
[root@7d935562e0ae /]# java -version
java version "1.8.0_111"
Java(TM) SE Runtime Environment (build 1.8.0_111-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode)
[root@7d935562e0ae /]# yum repo list
Loaded plugins: fastestmirror, ovl
No such command: repo. Please use /usr/bin/yum --help
[root@7d935562e0ae /]#
[root@7d935562e0ae /]# yum repolist
...
[root@7d935562e0ae home]# cd /usr/local/
root@7d935562e0ae local]# mkdir yumrepo
下载所需离线包
[root@7d935562e0ae local]# cd yumrepo/
[root@7d935562e0ae yumrepo]# yum install --downloadonly --downloaddir=/usr/local/yumrepo/ docker
安装 createrepo
[root@7d935562e0ae yum.repos.d]# yum install createrepo -y
新建 docker.repo
[root@7d935562e0ae yum.repos.d]# pwd
/etc/yum.repos.d
[root@7d935562e0ae yum.repos.d]# vi docker.repo
docker.repo
[docker-yum]
name=dockeryum
baseurl=file:///usr/local/yumrepo
enable=1
gpgcheck=0
生成 repo 索引
主要是将索引生成在 /usr/local/yumrepo/repodata 目录
[root@7d935562e0ae yum.repos.d]# createrepo /usr/local/yumrepo/
[root@7d935562e0ae yum.repos.d]# cd /usr/local/yumrepo/
[root@7d935562e0ae yumrepo]# ls
.....
docker-client-1.13.1-53.git774336d.el7.centos.x86_64.rpm repodata
.....
[root@7d935562e0ae yumrepo]# yum --disablerepo=\* --enablerepo=docker-yum install docker -y
[root@7d935562e0ae yumrepo]# docker -v
Docker version 1.13.1, build 774336d/1.13.1
此时会报错:提示 docker daemon 没有启动;
[root@7d935562e0ae /]# docker run hello-world
/usr/bin/docker-current: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.
See ‘/usr/bin/docker-current run --help‘.
启动 docker 守护进程
使用 sysytemctl 启动服务。此时会报错,是 CentOS7.2 容器的“安全”考虑,没有启动D-Bus:虽然不那么友好;
[root@7d935562e0ae /]# systemctl start docker
Failed to get D-Bus connection: Operation not permitted
在能查到的资料里,即使是官方,也没有说明 Docker Daemon 的守护命令放置在哪儿,以便我们能直接运行;
后续在安装 Docker-CE 时我找到了这个命令:使用 rpm -ql docker 查找该软件安装时在 PATH 下有哪些命令可以运行,成功找到了 Docker Daemon 所在:/usr/bin/dockerd 。详见文末参考;
直接运行 /usr/bin/dockerd
[root@7d935562e0ae /]# /usr/bin/dockerd
INFO[2018-05-22T11:55:22.811053980Z] libcontainerd: started new docker-containerd process pid=53
INFO[0000] starting containerd module=containerd revision=773c489c9c1b21a6d78b5c538cd395416ec50f88 version=v1.0.3
ERRO[0000] failed to change OOM score to -500 error="write /proc/53/oom_score_adj: permission denied" module=containerd
....
仍旧报错,但至少验证了离线安装的思路是正确的。只是在 CentOS7.2 容器中无法启动 Docker 守护进程;
经过数轮的尝试,我们可以得出结论:
梳理思路,重来
下载 centos7.2 基础镜像
ChinaDreams:docker-systemctl kangcunhua$ docker run -it --name dc18 sssllc/centos7.2-jdk1.8 /bin/bash
[root@557a4e0c3e7e /]#
如果不配置 docker-ce 源,默认安装的是 docker1.13。大概是两年前的版本了。后续docker 官方将社区版本命名为 docker-ce。所以安装新版本,还是要配置下yum源的:这里强烈建议配置国内的,速度快。
[root@557a4e0c3e7e /]# yum-config-manager --add-repo https://mirrors.ustc.edu.cn/docker-ce/linux/centos/docker-ce.repo
配置后, yum search docker-ce 可以搜索到了。这时候就可以下载到指定位置:为了后续离线安装;
[root@557a4e0c3e7e /]# cd /usr/local
[root@557a4e0c3e7e local]# mkdir yumrepo
[root@557a4e0c3e7e local]# yum install --downloadonly --downloaddir=/usr/local/yumrepo/ docker-ce
建立索引
先安装本地 repo 索引创建工具,通过这个工具,建立索引:就是本地安装包所在目录下的 repodata 目录;
[root@557a4e0c3e7e yumrepo]# yum install createrepo -y
[root@557a4e0c3e7e yumrepo]# createrepo /usr/local/yumrepo/
创建源文件 docker.repo
[root@557a4e0c3e7e yumrepo]# cd /etc/yum.repos.d
[root@557a4e0c3e7e yum.repos.d]# vi docker.repo
[root@557a4e0c3e7e yum.repos.d]# more docker.repo
[docker-yum]
name=dockeryum
baseurl=file:///usr/local/yumrepo
enable=1
gpgcheck=0
yum --disablerepo=\* --enablerepo=docker-yum install docker-ce -y
[root@557a4e0c3e7e yum.repos.d]# docker -v
Docker version 18.03.1-ce, build 9ee9f40
启动 dockerd,报错
这个是因为容器中又启动了 Docker daemon。部分报错日志节选:
[root@557a4e0c3e7e /]# docker -v
Docker version 18.03.1-ce, build 9ee9f40
[root@557a4e0c3e7e /]# /usr/bin/dockerd
...
ERRO[0000] failed to change OOM score to -500 error="write /proc/53/oom_score_adj: permission denied" module=containerd
...
address="/var/run/docker/containerd/docker-containerd.sock" module="containerd/grpc"
INFO[0000] containerd successfully booted in 0.029058s module=containerd
ERRO[2018-05-22T11:55:23.265326880Z] ‘overlay2‘ is not supported over aufs
...
WARN[2018-05-22T11:55:23.353577680Z] Running modprobe xt_conntrack failed with message: ``, error: exit status 1
Error starting daemon: Error initializing network controller: error obtaining controller instance: failed to create NAT chain DOCKER: iptables failed: iptables -t nat -N DOCKER: iptables v1.4.21: can‘t initialize iptables table `nat‘: Permission denied (you must be root)
Perhaps iptables or your kernel needs to be upgraded.
(exit status 3)
Copy 资源出来
ChinaDreams:Desktop kangcunhua$ docker cp dc18:/usr/local/yumrepo .
ChinaDreams:Desktop kangcunhua$ docker cp dc18:/etc/yum.repos.d/docker.repo .
copy 资源到内网,通过ssh将依赖包传到服务器;
[root@pma03 ~]# yum repolist #可以成功查看到docker-yum
[root@pma03 ~]# yum --disablerepo=\* --enablerepo=docker-yum install docker-ce -y
报错,缺依赖包;docker-ce 相关依赖包已经全了,只是有一些 CentOS 依赖的包版本比 docker-ce 低,内网系统可能优化精简“过”了,或基础软件不完整,导致这些低版本和高版本不能和谐共处;只能根据报错信息,去笔记本下载依赖;报错信息和分析详见文末:“附:依赖包冲突和解决”;
解决依赖
依旧是回到个人笔记本,联网下载依赖包:
ChinaDreams:~ kangcunhua$ docker start dc7
dc7
[root@ce27b30d0d9e /]# yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
[root@ce27b30d0d9e /]# yum clean all
[root@ce27b30d0d9e /]# yum makecache
共计尝试两次,使用如下命令,下载补全系统依赖包:
编号 | 命令 |
---|---|
1 | repotrack -a x86_64 -p /usr/local/yumrepo docker-ce |
2 | repotrack -a x86_64 -p /usr/local/yumrepo glibc-2.17-105.e |
3 | repotrack -a x86_64 -p /usr/local/yumrepo systemd-sysv |
4 | repotrack -a x86_64 -p /usr/local/yumrepo dracut-network |
5 | repotrack -a x86_64 -p /usr/local/yumrepo libgudev1 |
6 | repotrack -a x86_64 -p /usr/local/yumrepo dracut-config-rescue |
7 | repotrack -a x86_64 -p /usr/local/yumrepo systemd-python |
8 | repotrack -a x86_64 -p /usr/local/yumrepo libstdc++ |
9 | repotrack -a x86_64 -p /usr/local/yumrepo glibc-headers |
10 | repotrack -a x86_64 -p /usr/local/yumrepo pcre-devel |
11 | repotrack -a x86_64 -p /usr/local/yumrepo gcc-c++ |
12 | repotrack -a x86_64 -p /usr/local/yumrepo glibc-devel |
13 | repotrack -a x86_64 -p /usr/local/yumrepo libtool-ltdl |
14 | repotrack -a x86_64 -p /usr/local/yumrepo libselinux-devel |
15 | repotrack -a x86_64 -p /usr/local/yumrepo libsepol-devel |
笔记本上验证
保证这些依赖包,不会导致安装失败。
[root@ce27b30d0d9e /]# yum --disablerepo=\* --enablerepo=docker-yum install docker -y
安装
将依赖包上传到内网服务器指定目录 /usr/local/yumrepo ;
[root@pma03 ~]# yum --disablerepo=\* --enablerepo=docker-yum install docker-ce -y
没有报错!
验证
[root@pma03 ~]# docker -v
Docker version 18.03.1-ce, build 9ee9f40
启动服务
[root@pma03 ~]# systemctl start docker
搞定!
配置用户
添加一个用户 dev,专门管理 docker。千万不要图省事,服务器上直接用 root 管理docker;容器可以;
[root@pma03 ~]# cat /etc/group
[root@pma03 ~]# cat /etc/group | grep docker
[root@pma03 ~]# more /etc/passwd
[root@pma03 ~]# gpasswd -a dev docker
[root@pma03 ~]# useradd -g docker dev
[root@pma03 ~]# passwd dev
[root@pma03 ~]# chmod -v u+w /etc/sudoers
[root@pma03 ~]# vi /etc/sudoers
[root@pma03 ~]# chomod -v u-w /etc/sudoers
[root@pma03 ~]# systemctl restart docker
[root@pma03 ~]# docker -v
[root@pma03 ~]# docker info
[root@pma03 ~]# su dev
[dev@pma03 ~]#
又被坑了:docker for Mac、docker for windows 安装完都自带 docker-compose,linux版本的 docker-ce 居然不带。想起来离线安装各种坑就头大,网上查了半天资料,居然是个 python 工具,要先安装 pip,o No!只好翻到 github,看看能不能源码编译安装。结果看到有 release 的下载,猜想可以直接使用。后来用下载后的文件百度,果然翻到一篇指南,可以这样搞:
方法四:离线安装
下载 docker-compose-Linux-x86_64,然后重新命名添加可执行权限即可:
笔记本验证先
ChinaDreams:Desktop kangcunhua$ docker cp ./docker-compose-Linux-x86_64.dms dc18:/usr/local/bin/docker-compose
进入容器
[root@557a4e0c3e7e /]# cd /usr/local/bin/
[root@557a4e0c3e7e bin]# ls
docker-compose
[root@557a4e0c3e7e bin]# chmod +x /usr/local/bin/docker-compose
[root@557a4e0c3e7e bin]# docker-compose -v
docker-compose version 1.21.2, build a133471
同样把安装包 copy 进内网,ssh 上传到服务器
[root@pma03 ~]# cd /usr/local/bin/
[root@pma03 bin]# cp /home/dev/docker-images/docker-compose-Linux-x86_64.dms docker-compose
[root@pma03 bin]# chmod +x ./docker-compose
[root@pma03 bin]# docker-compose -v
[root@pma03 bin]# chown -R dev:docker ./docker-compose
[root@pma03 bin]# su dev
[dev@pma03 ~]# docker-compose -v
搞定!
后续要做的事情就简单了:
内网离线安装碰上的依赖包问题和分析
报错
yun install docker-ce 时,提示有依赖包版本冲突or缺失;
Error: Package: systemd-sysv-219-19.el7.x86_64 (@anaconda)
Requires: systemd = 219-19.el7
Removing: systemd-219-19.el7.x86_64 (@anaconda)
systemd = 219-19.el7
Updated By: systemd-219-42.el7_4.4.x86_64 (localyum)
systemd = 219-42.el7_4.4
Error: Package: dracut-network-033-359.el7.x86_64 (@anaconda)
Requires: dracut = 033-359.el7
Removing: dracut-033-359.el7.x86_64 (@anaconda)
dracut = 033-359.el7
Updated By: dracut-033-502.el7.x86_64 (localyum)
dracut = 033-502.el7
Error: Package: libgudev1-219-19.el7.x86_64 (@anaconda)
Requires: systemd-libs = 219-19.el7
Removing: systemd-libs-219-19.el7.x86_64 (@anaconda)
systemd-libs = 219-19.el7
Updated By: systemd-libs-219-42.el7_4.4.x86_64 (localyum)
systemd-libs = 219-42.el7_4.4
Error: Package: dracut-config-rescue-033-359.el7.x86_64 (@anaconda)
Requires: dracut = 033-359.el7
Removing: dracut-033-359.el7.x86_64 (@anaconda)
dracut = 033-359.el7
Updated By: dracut-033-502.el7.x86_64 (localyum)
dracut = 033-502.el7
Error: Package: systemd-python-219-19.el7.x86_64 (@anaconda)
Requires: systemd = 219-19.el7
Removing: systemd-219-19.el7.x86_64 (@anaconda)
systemd = 219-19.el7
Updated By: systemd-219-42.el7_4.4.x86_64 (localyum)
systemd = 219-42.el7_4.4
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
看到报错的时候,内心是崩溃的。最后还是收拾心情,逐一解决了。
网上唯一可以找到的资料就是这篇离线安装 docker 包冲突,报错信息一模一样,但是帖子没有给出确定的原因和解决办法;但是给予了我信心,确实不是因为 CentOS7.2和 Redhat7.2 有底层不同,导致的这些错误,这样是无力解决的;后续解决完依赖后,我猜测原因是,甲方提供的 Redhat 或 CentOS,默认软件包安装的有问题:做了一些精简“优化”处理不了部分依赖包冲突;
后续找到了这篇文章:CentOS7.2 离线安装 docker-ce 最新版,文中指出 Docker 需要的部分软件包版本要高于 CentOS7;就是说同样的软件包,Docker 依赖的高版本的,但是 CentOS 依赖低版本的;解决办法就是找到他们,全部安装上去;
下载 libgudev1 和 systemd-sysv,是因为 centos7.2 的 libgudev1 和 systemd-sysv 依赖 systemd-219-19.el7.x86_64,而 docker-ce 需要 systemd-219-30el7.x86_64.
再次尝试
repotrack -a x86_64 解决上述依赖后(命令详见正文:解决依赖),copy 进内网,再次尝试安装 Docker-CE
Error: Package: systemd-sysv-219-19.el7.x86_64 (@anaconda)
Requires: systemd = 219-19.el7
Removing: systemd-219-19.el7.x86_64 (@anaconda)
systemd = 219-19.el7
Updated By: systemd-219-42.el7_4.4.x86_64 (localyum)
systemd = 219-42.el7_4.4
Error: Package: dracut-network-033-359.el7.x86_64 (@anaconda)
Requires: dracut = 033-359.el7
Removing: dracut-033-359.el7.x86_64 (@anaconda)
dracut = 033-359.el7
Updated By: dracut-033-502.el7.x86_64 (localyum)
dracut = 033-502.el7
Error: Package: libgudev1-219-19.el7.x86_64 (@anaconda)
Requires: systemd-libs = 219-19.el7
Removing: systemd-libs-219-19.el7.x86_64 (@anaconda)
systemd-libs = 219-19.el7
Updated By: systemd-libs-219-42.el7_4.4.x86_64 (localyum)
systemd-libs = 219-42.el7_4.4
Error: Package: dracut-config-rescue-033-359.el7.x86_64 (@anaconda)
Requires: dracut = 033-359.el7
Removing: dracut-033-359.el7.x86_64 (@anaconda)
dracut = 033-359.el7
Updated By: dracut-033-502.el7.x86_64 (localyum)
dracut = 033-502.el7
Error: Package: systemd-python-219-19.el7.x86_64 (@anaconda)
Requires: systemd = 219-19.el7
Removing: systemd-219-19.el7.x86_64 (@anaconda)
systemd = 219-19.el7
Updated By: systemd-219-42.el7_4.4.x86_64 (localyum)
systemd = 219-42.el7_4.4
解决办法就是继续回到笔记本联网下载这些依赖包;详见:“解决依赖”;
可以的,直接敲“rpm -ivh 包名”但是有些 rpm 包是有依赖性的,可以在命令尾端添加“–force –nodeps”,“–force”指强制“,”–nodeps“指不查找依赖性
比如”rpm -ivh *.rpm –force —nodeps“,同时,也可以使用 yum命 令,会自动解决包依赖的关系,能便于管理大量系统的更新问题,建议使用 yum
Runtime privilege, Linux capabilities, and LXC configuration
–cap-add : Add Linux capabilities
–cap-drop : Drop Linux capabilities
–privileged=false : Give extended privileges to this container
–device=[] : Allows you to run devices inside the container without the –privileged flag.
–lxc-conf=[] : (lxc exec-driver only) Add custom lxc options –lxc-conf=”lxc.cgroup.cpuset.cpus = 0,1”
默认情况下,Docker的容器是没有特权的,例如不能在容器中再启动一个容器。这是因为默认情况下容器是不能访问任何其它设备的。但是通过”privileged”,容器就拥有了访问任何其它设备的权限。
我尝试了下,启动非常之慢:不推荐
ChinaDreams:~ kangcunhua$ docker run -it --privileged --name dc99 sssllc/centos7.2-jdk1.8 /usr/sbin/init
Welcome to CentOS Linux 7 (Core)!
[ OK ] Reached target Swap.
[ OK ] Created slice Root Slice.
[ OK ] Listening on udev Control Socket.
[ OK ] Reached target Encrypted Volumes.
[ OK ] Listening on udev Kernel Socket.
[ OK ] Listening on Delayed Shutdown Socket.
[ OK ] Listening on /dev/initctl Compatibility Named Pipe.
[ OK ] Reached target Remote File Systems.
[ OK ] Created slice User and Session Slice.
[ OK ] Created slice System Slice.
[ OK ] Created slice system-serial\x2dgetty.slice.
[ OK ] Reached target Slices.
[ OK ] Listening on Journal Socket.
Mounting Debug File System...
Starting Journal Service...
Mounting FUSE Control File System...
Starting Apply Kernel Variables...
Starting Create Static Device Nodes in /dev...
Mounting Huge Pages File System...
Starting Setup Virtual Console...
[ OK ] Created slice system-getty.slice.
Starting Remount Root and Kernel File Systems...
[ OK ] Reached target Paths.
[ OK ] Mounted FUSE Control File System.
[ OK ] Mounted Debug File System.
[ OK ] Mounted Huge Pages File System.
[ OK ] Started Apply Kernel Variables.
[ OK ] Started Setup Virtual Console.
[ OK ] Started Create Static Device Nodes in /dev.
Starting udev Kernel Device Manager...
[ OK ] Started Journal Service.
[ OK ] Started udev Kernel Device Manager.
[FAILED] Failed to start Remount Root and Kernel File Systems.
See ‘systemctl status systemd-remount-fs.service‘ for details.
[ OK ] Reached target Local File Systems (Pre).
Starting Rebuild Hardware Database...
Starting Load/Save Random Seed...
Starting Flush Journal to Persistent Storage...
[ OK ] Reached target Local File Systems.
Starting Rebuild Journal Catalog...
[ OK ] Started Flush Journal to Persistent Storage.
Starting Create Volatile Files and Directories...
[ OK ] Started Load/Save Random Seed.
[ OK ] Started Rebuild Journal Catalog.
[ OK ] Started Create Volatile Files and Directories.
Starting Update UTMP about System Boot/Shutdown...
[ OK ] Started Update UTMP about System Boot/Shutdown.
[ OK ] Started Rebuild Hardware Database.
Starting udev Coldplug all Devices...
Starting Update is Completed...
[ OK ] Started Update is Completed.
[ OK ] Started udev Coldplug all Devices.
[ OK ] Reached target System Initialization.
[ OK ] Reached target Timers.
[ OK ] Listening on D-Bus System Message Bus Socket.
[ OK ] Reached target Sockets.
[ OK ] Reached target Basic System.
Starting LSB: Supports the direct execution of binary formats....
Starting Permit User Sessions...
[ OK ] Started D-Bus System Message Bus.
Starting D-Bus System Message Bus...
Starting Login Service...
[ OK ] Started Permit User Sessions.
Starting Cleanup of Temporary Directories...
[ OK ] Started Getty on tty1.
Starting Getty on tty1...
[ OK ] Started Cleanup of Temporary Directories.
[ OK ] Started Login Service.
[ OK ] Started LSB: Supports the direct execution of binary formats..
[ TIME ] Timed out waiting for device dev-ttyS0.device.
[DEPEND] Dependency failed for Serial Getty on ttyS0.
[ OK ] Reached target Login Prompts.
[ OK ] Reached target Multi-User System.
Starting Update UTMP about System Runlevel Changes...
[ OK ] Started Update UTMP about System Runlevel Changes.
^C^C^C^C^C^Cc\c/
$ sudo yum-config-manager --add-repo https://mirrors.ustc.edu.cn/docker-ce/linux/centos/docker-ce.repo
$ sudo yum-config-manager --enable docker-ce-edge
$ sudo yum makecache fast
$ sudo yum install docker-ce
rpm -ql 软件包 查看安装的时候有哪些命令在 PATH 下,用这些命令去启动,这个是一种解决的方法
[root@9c676d901d7b bin]# rpm -ql docker-ce
/etc/udev/rules.d/80-docker.rules
/usr/bin/docker
/usr/bin/docker-containerd
/usr/bin/docker-containerd-ctr
/usr/bin/docker-containerd-shim
/usr/bin/docker-init
/usr/bin/docker-proxy
/usr/bin/docker-runc
/usr/bin/dockerd
/usr/lib/systemd/system/docker.service
/usr/share/bash-completion/completions/docker
1月10日晚上21:00-22:00,我们会有 k8s 的一个分享会,有兴趣的朋友可以加小助手wechat:17812796384 进入直播分享群
Docker 验证 Centos7.2 离线安装 Docker 环境
标签:拉取 usr 新版本 config iptable libs plugin over -name
原文地址:http://blog.51cto.com/51reboot/2340063