系統環境爲: CentOS Linux release 7.5.1804 (Core)php
安裝docker版本爲: 17.12.0-cehtml
在http://mirrors.163.com/centos/7/os/x86_64/Packages/中下載以下rpm安裝包:python
audit-2.8.4-4.el7.x86_64.rpm
audit-libs-2.8.4-4.el7.x86_64.rpm
libselinux-2.5-14.1.el7.x86_64.rpm
libselinux-python-2.5-14.1.el7.x86_64.rpm
libselinux-utils-2.5-14.1.el7.x86_64.rpm
libsemanage-2.5-14.el7.x86_64.rpm
libsepol-2.5-10.el7.x86_64.rpm
policycoreutils-2.5-29.el7.x86_64.rpm
audit-libs-python-2.8.4-4.el7.x86_64.rpm
checkpolicy-2.5-8.el7.x86_64.rpm
libcgroup-0.41-20.el7.x86_64.rpm
libsemanage-python-2.5-14.el7.x86_64.rpm
libtool-ltdl-2.4.2-22.el7_3.x86_64.rpm
policycoreutils-python-2.5-29.el7.x86_64.rpm
python-IPy-0.75-6.el7.noarch.rpm
setools-libs-3.3.8-4.el7.x86_64.rpm
複製代碼
在https://download.docker.com/linux/centos/7/x86_64/stable/Packages/中下載docker的安裝包:linux
docker-ce-17.12.0.ce-1.el7.centos.x86_64.rpm
複製代碼
在http://rpm.pbone.net/index.php3/stat/4/idpl/36266349/dir/scientific_linux_7/com/container-selinux-2.9-4.el7.noarch.rpm.html中下載container-selinux安裝包:docker
container-selinux-2.9-4.el7.noarch.rpm
複製代碼
經測試本系統中有些rpm安裝包是須要update,有些是要install,爲此將上述的rpm包分紅update_rpm和install_rpm,其中: update_rpm中的rpm有:centos
audit-2.8.4-4.el7.x86_64.rpm
audit-libs-2.8.4-4.el7.x86_64.rpm
libselinux-2.5-14.1.el7.x86_64.rpm
libselinux-python-2.5-14.1.el7.x86_64.rpm
libselinux-utils-2.5-14.1.el7.x86_64.rpm
libsemanage-2.5-14.el7.x86_64.rpm
libsepol-2.5-10.el7.x86_64.rpm
policycoreutils-2.5-29.el7.x86_64.rpm
複製代碼
install_rpm中的rpm有:bash
audit-libs-python-2.8.4-4.el7.x86_64.rpm
checkpolicy-2.5-8.el7.x86_64.rpm
container-selinux-2.9-4.el7.noarch.rpm
docker-ce-17.12.0.ce-1.el7.centos.x86_64.rpm
libcgroup-0.41-20.el7.x86_64.rpm
libsemanage-python-2.5-14.el7.x86_64.rpm
libtool-ltdl-2.4.2-22.el7_3.x86_64.rpm
policycoreutils-python-2.5-29.el7.x86_64.rpm
python-IPy-0.75-6.el7.noarch.rpm
setools-libs-3.3.8-4.el7.x86_64.rpm
複製代碼
首先更新須要更新rpm,即執行以下命令:微信
rpm -Uvh update_rpm/*.rpm
複製代碼
安裝須要安裝的rpm,即執行以下命令:架構
rpm -ivh install_rpm/*.rpm
複製代碼
啓動docker:測試
systemctl start docker
複製代碼
設置docker開機自啓動:
systemctl enable docker
複製代碼
驗證是否安裝成功,直接輸入以下命令:
docker version
複製代碼
若是出現下面頁面,則表示安裝成功了!
以你最方便的方式關注我: 微信公衆號