centos7 离线安装docker-ce
测试的时候,在VM中安装了一个minimal安装的centos7.
因为发现在已经安装好环境的系统中,执行下面,并不会下载依赖的rpm.
#下载docker-ce和其需要的依赖rpm
yum install docker-ce --downloadonly --downloaddir=/home/student/docker-local
#发现这个包已经存,所以只用更新就可以
rpm -U audit-libs-2.8.1-3.el7_5.1.x86_64.rpm
#案装其他包与docker-ce 可按下面的顺序安装 或者使用 rpm -ivh --nodeeps来忽略警告
rpm -ivh audit-2.8.1-3.el7_5.1.x86_64.rpm rpm -ivh audit-libs-python-2.8.1-3.el7_5.1.x86_64.rpm rpm -ivh checkpolicy-2.5-6.el7.x86_64.rpm rpm -ivh libcgroup-0.41-15.el7.x86_64.rpm rpm -ivh libsemanage-python-2.5-11.el7.x86_64.rpm rpm -ivh python-IPy-0.75-6.el7.noarch.rpm rpm -ivh setools-libs-3.3.8-2.el7.x86_64.rpm rpm -ivh policycoreutils-python-2.5-22.el7.x86_64.rpm rpm -ivh container-selinux-2.68-1.el7.noarch.rpm rpm -ivh docker-ce-18.06.1.ce-3.el7.x86_64.rpm
#反向操作
rpm -e --nodeps audit-2.8.1-3.el7_5.1.x86_64 rpm -e --nodeps audit-libs-python-2.8.1-3.el7_5.1.x86_64 rpm -e --nodeps checkpolicy-2.5-6.el7.x86_64 rpm -e --nodeps libcgroup-0.41-15.el7.x86_64 rpm -e --nodeps libsemanage-python-2.5-11.el7.x86_64 rpm -e --nodeps python-IPy-0.75-6.el7.noarch rpm -e --nodeps setools-libs-3.3.8-2.el7.x86_64 rpm -e --nodeps policycoreutils-python-2.5-22.el7.x86_64 rpm -e --nodeps container-selinux-2.68-1.el7.noarch rpm -e --nodeps docker-ce-18.06.1.ce-3.el7.x86_64
#启动docker-ce systemctl start docker #检查docker 版本 docker version
Looking for a job working at Home about MSBI