来自 技术 2019-03-01 00:00 的文章

centos7离线安装docker

1.下载docker安装包

在https://download.docker.com/linux/centos/7/x86_64/stable/Packages/下载docker-ce-17.03.0.ce-1.el7.centos.x86_64.rpm

下载9个依赖 在http://mirrors.163.com/centos/7/os/x86_64/Packages/下载8个依赖

在http://rpm.pbone.net/index.php3?stat=3&limit=1&srodzaj=1&dl=40&search=container-selinux&field[]=1&field[]=2下载container-selinux-2.9-4.el7.noarch.rpm

3.安装

将8个依赖复制到服务器上如:/root/docker/

rpm -ivh audit-libs-python-2.7.6-3.el7.x86_64.rpm --nodepsrpm -ivh checkpolicy-2.5-4.el7.x86_64.rpm --nodepsrpm -ivh libcgroup-0.41-13.el7.x86_64.rpm --nodepsrpm -ivh libseccomp-2.3.1-3.el7.x86_64.rpm --nodepsrpm -ivh libsemanage-python-2.5-8.el7.x86_64.rpm --nodepsrpm -ivh policycoreutils-python-2.5-17.1.el7.x86_64.rpm --nodepsrpm -ivh python-IPy-0.75-6.el7.noarch.rpm --nodepsrpm -ivh audit-libs-python-2setools-libs-3.3.8-1.1.el7.x86_64.rpm --nodeps

将docker-ce-17.12.0.ce-1.el7.centos.x86_64.rpm和container-selinux-2.9-4.el7.noarch.rpm复制到/root/docker/rpm/

rpm -ivh container-selinux-2.9-4.el7.noarch.rpm --nodeps rpm -ivh docker-ce-17.03.0.ce-1.el7.centos.x86_64.rpm --nodeps

4.启动

service dockerstart

docker -v