name=Docker Repository
baseurl=https://yum.dockerproject.org/repo/main/fedora/25/
enabled=1
gpgcheck=0
uname -r
4.13.9-300.fc27.x86_64
或者html
uname -a
Linux localhost.localdomain 4.13.9-300.fc27.x86_64 #1 SMP Mon Oct 23 13:41:58 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
這個內核版本大於3.1.0便可python
把上面的yum添加到/etc/yum.repos.d, 而後更新yum源, 若是更新失敗, 則使用代理。linux
yum install -y docker-engine
[root@localhost yum.repos.d]# yum install -y docker-engine
上次元數據過時檢查:0:01:26 前,執行於 2018年01月09日 星期二 18時31分15秒。
依賴關係解決。
==========================================================================================================================================================================
軟件包 架構 版本 倉庫 大小
==========================================================================================================================================================================
安裝:
docker-engine x86_64 17.05.0.ce-1.fc25 dockerrepo 20 M
正在安裝安裝依賴關係:
audit-libs-python x86_64 2.7.8-1.fc27 local_resource 81 k
checkpolicy x86_64 2.7-1.fc27 local_resource 330 k
docker-engine-selinux noarch 17.05.0.ce-1.fc25 dockerrepo 33 k
libcgroup x86_64 0.41-13.fc27 local_resource 67 k
libselinux-python x86_64 2.7-2.fc27 local_resource 250 k
libsemanage-python x86_64 2.7-1.fc27 local_resource 118 k
policycoreutils-python x86_64 2.7-1.fc27 local_resource 410 k
python-enum34 noarch 1.1.6-2.fc27 local_resource 57 k
python2-IPy noarch 0.81-20.fc27 local_resource 42 k
setools-python x86_64 4.1.1-3.fc27 local_resource 580 k
事務概要
==========================================================================================================================================================================
安裝 11 軟件包
總計:21 M
總下載:20 M
安裝大小:78 M
下載軟件包:
(1/2): docker-engine-selinux-17.05.0.ce-1.fc25.noarch.rpm 20 kB/s | 33 kB 00:01
(2/2): docker-engine-17.05.0.ce-1.fc25.x86_64.rpm 552 kB/s | 20 MB 00:36
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
總計 553 kB/s | 20 MB 00:36
運行事務檢查
事務檢查成功。
運行事務測試
事務測試成功。
運行事務
準備中 : 1/1
運行腳本: libcgroup-0.41-13.fc27.x86_64 1/11
安裝 : libcgroup-0.41-13.fc27.x86_64 1/11
運行腳本: libcgroup-0.41-13.fc27.x86_64 1/11
安裝 : python-enum34-1.1.6-2.fc27.noarch 2/11
安裝 : setools-python-4.1.1-3.fc27.x86_64 3/11
安裝 : python2-IPy-0.81-20.fc27.noarch 4/11
安裝 : libsemanage-python-2.7-1.fc27.x86_64 5/11
安裝 : libselinux-python-2.7-2.fc27.x86_64 6/11
安裝 : checkpolicy-2.7-1.fc27.x86_64 7/11
安裝 : audit-libs-python-2.7.8-1.fc27.x86_64 8/11
安裝 : policycoreutils-python-2.7-1.fc27.x86_64 9/11
安裝 : docker-engine-selinux-17.05.0.ce-1.fc25.noarch 10/11
運行腳本: docker-engine-selinux-17.05.0.ce-1.fc25.noarch 10/11
neverallow check failed at /var/lib/selinux/targeted/tmp/modules/100/base/cil:8988
(neverallow base_typeattr_7 unlabeled_t (file (entrypoint)))
<root>
allow at /var/lib/selinux/targeted/tmp/modules/400/docker/cil:519
(allow spc_t unlabeled_t (file (entrypoint)))
<root>
allow at /var/lib/selinux/targeted/tmp/modules/100/sandboxX/cil:840
(allow sandbox_x_domain exec_type (file (entrypoint)))
<root>
allow at /var/lib/selinux/targeted/tmp/modules/100/virt/cil:1664
(allow virtd_lxc_t exec_type (file (entrypoint)))
<root>
allow at /var/lib/selinux/targeted/tmp/modules/100/virt/cil:2055
(allow svirt_sandbox_domain exec_type (file (entrypoint)))
Failed to generate binary
/usr/sbin/semodule: Failed!
restorecon: lstat(/var/lib/docker) failed: No such file or directory
警告:%post(docker-engine-selinux-17.05.0.ce-1.fc25.noarch) 腳本執行失敗,退出狀態碼爲 255
Non-fatal POSTIN scriptlet failure in rpm package docker-engine-selinux
Non-fatal POSTIN scriptlet failure in rpm package docker-engine-selinux
安裝 : docker-engine-17.05.0.ce-1.fc25.x86_64 11/11
運行腳本: docker-engine-17.05.0.ce-1.fc25.x86_64 11/11
驗證 : docker-engine-17.05.0.ce-1.fc25.x86_64 1/11
驗證 : docker-engine-selinux-17.05.0.ce-1.fc25.noarch 2/11
驗證 : libcgroup-0.41-13.fc27.x86_64 3/11
驗證 : policycoreutils-python-2.7-1.fc27.x86_64 4/11
驗證 : audit-libs-python-2.7.8-1.fc27.x86_64 5/11
驗證 : checkpolicy-2.7-1.fc27.x86_64 6/11
驗證 : libselinux-python-2.7-2.fc27.x86_64 7/11
驗證 : libsemanage-python-2.7-1.fc27.x86_64 8/11
驗證 : python2-IPy-0.81-20.fc27.noarch 9/11
驗證 : setools-python-4.1.1-3.fc27.x86_64 10/11
驗證 : python-enum34-1.1.6-2.fc27.noarch 11/11
已安裝:
docker-engine.x86_64 17.05.0.ce-1.fc25 audit-libs-python.x86_64 2.7.8-1.fc27 checkpolicy.x86_64 2.7-1.fc27 docker-engine-selinux.noarch 17.05.0.ce-1.fc25
libcgroup.x86_64 0.41-13.fc27 libselinux-python.x86_64 2.7-2.fc27 libsemanage-python.x86_64 2.7-1.fc27 policycoreutils-python.x86_64 2.7-1.fc27
python-enum34.noarch 1.1.6-2.fc27 python2-IPy.noarch 0.81-20.fc27 setools-python.x86_64 4.1.1-3.fc27
完畢!
systemctl start docker.service
[root@localhost init.d]# docker version
Client:
Version: 17.05.0-ce
API version: 1.29
Go version: go1.7.5
Git commit: 89658be
Built: Thu May 4 22:14:18 2017
OS/Arch: linux/amd64
Server:
Version: 17.05.0-ce
API version: 1.29 (minimum version 1.12)
Go version: go1.7.5
Git commit: 89658be
Built: Thu May 4 22:14:18 2017
OS/Arch: linux/amd64
Experimental: false
有client和service兩部分表示docker安裝啓動都成功了
[root@localhost init.d]# sudo systemctl enable docker