我遵循此博客中的说明"Linux 7服务器。
这是我的 yum install docker-engine
日志:
Loaded plugins: langpacks
ol7_UEKR4 | 1.2 kB 00:00:00
ol7_addons | 1.2 kB 00:00:00
ol7_latest | 1.4 kB 00:00:00
Resolving Dependencies
--> Running transaction check
---> Package docker-engine.x86_64 0:17.06.2.ol-1.0.1.el7 will be installed
--> Processing Dependency: container-selinux >= 2.9 for package: docker-engine-17.06.2.ol-1.0.1.el7.x86_64
--> Running transaction check
---> Package container-selinux.noarch 2:2.21-1.el7 will be installed
--> Processing Dependency: selinux-policy-targeted >= 3.13.1-39 for package: 2:container-selinux-2.21-1.el7.noarch
--> Processing Dependency: selinux-policy-base >= 3.13.1-39 for package: 2:container-selinux-2.21-1.el7.noarch
--> Running transaction check
---> Package selinux-policy-targeted.noarch 0:3.13.1-166.0.3.el7_4.7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================================================================================
Package Arch Version Repository Size
================================================================================================================================================
Installing:
docker-engine x86_64 17.06.2.ol-1.0.1.el7 ol7_addons 21 M
Installing for dependencies:
container-selinux noarch 2:2.21-1.el7 ol7_addons 28 k
selinux-policy-targeted noarch 3.13.1-166.0.3.el7_4.7 ol7_latest 6.5 M
Transaction Summary
================================================================================================================================================
Install 1 Package (+2 Dependent packages)
Total download size: 27 M
Installed size: 92 M
Is this ok [y/d/N]: y
Downloading packages:
(1/3): container-selinux-2.21-1.el7.noarch.rpm | 28 kB 00:00:00
(2/3): docker-engine-17.06.2.ol-1.0.1.el7.x86_64.rpm | 21 MB 00:00:21
(3/3): selinux-policy-targeted-3.13.1-166.0.3.el7_4.7.noarch.rpm | 6.5 MB 00:00:29
------------------------------------------------------------------------------------------------------------------------------------------------
Total 935 kB/s | 27 MB 00:00:29
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
warning: Failed to open SELinux handle.
Installing : selinux-policy-targeted-3.13.1-166.0.3.el7_4.7.noarch 1/3
Installing : 2:container-selinux-2.21-1.el7.noarch 2/3
Installing : docker-engine-17.06.2.ol-1.0.1.el7.x86_64 3/3
Verifying : docker-engine-17.06.2.ol-1.0.1.el7.x86_64 1/3
Verifying : selinux-policy-targeted-3.13.1-166.0.3.el7_4.7.noarch 2/3
Verifying : 2:container-selinux-2.21-1.el7.noarch 3/3
Installed:
docker-engine.x86_64 0:17.06.2.ol-1.0.1.el7
Dependency Installed:
container-selinux.noarch 2:2.21-1.el7 selinux-policy-targeted.noarch 0:3.13.1-166.0.3.el7_4.7
Complete!
它似乎已经正确安装了,但是下一步I,e。要启动Docker给我这个错误:
--->#SystemCtl Start docker
Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.
->#SystemCtl状态Docker.Service
docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/docker.service.d
└─docker-sysconfig.conf
Active: failed (Result: start-limit) since Thu 2017-12-28 17:48:45 IST; 13s ago
Docs: https://docs.docker.com
Process: 26093 ExecStart=/usr/bin/dockerd $OPTIONS $DOCKER_STORAGE_OPTIONS $DOCKER_NETWORK_OPTIONS $INSECURE_REGISTRY (code=exited, status=1/FAILURE)
Main PID: 26093 (code=exited, status=1/FAILURE)
Dec 28 17:48:45 Linuxtest systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
Dec 28 17:48:45 Linuxtest systemd[1]: Failed to start Docker Application Container Engine.
Dec 28 17:48:45 Linuxtest systemd[1]: Unit docker.service entered failed state.
Dec 28 17:48:45 Linuxtest systemd[1]: docker.service failed.
Dec 28 17:48:45 Linuxtest systemd[1]: docker.service holdoff time over, scheduling restart.
Dec 28 17:48:45 Linuxtest systemd[1]: start request repeated too quickly for docker.service
Dec 28 17:48:45 Linuxtest systemd[1]: Failed to start Docker Application Container Engine.
Dec 28 17:48:45 Linuxtest systemd[1]: Unit docker.service entered failed state.
Dec 28 17:48:45 Linuxtest systemd[1]: docker.service failed.
->#journalctl -xe -l -u docker |尾巴-n 50
[root@Linuxtest ~]# journalctl -xe -l -u docker | tail -n 50
-- Subject: Unit docker.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit docker.service has begun starting up.
Dec 29 08:54:39 Linuxtest dockerd[44034]: time="2017-12-29T08:54:39.738769156+05:30" level=info msg="libcontainerd: new containerd process, pid: 44041"
Dec 29 08:54:40 Linuxtest dockerd[44034]: time="2017-12-29T08:54:40.754043731+05:30" level=fatal msg="Your Linux kernel version 3.8.13-55.1.6.el7uek.x86_64 is not supported for running docker. Please upgrade your kernel to 3.10.0 or newer."
Dec 29 08:54:40 Linuxtest systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
Dec 29 08:54:40 Linuxtest systemd[1]: Failed to start Docker Application Container Engine.
-- Subject: Unit docker.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit docker.service has failed.
--
-- The result is failed.
Dec 29 08:54:40 Linuxtest systemd[1]: Unit docker.service entered failed state.
Dec 29 08:54:40 Linuxtest systemd[1]: docker.service failed.
Dec 29 08:54:40 Linuxtest systemd[1]: docker.service holdoff time over, scheduling restart.
Dec 29 08:54:40 Linuxtest systemd[1]: Starting Docker Application Container Engine...
-- Subject: Unit docker.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit docker.service has begun starting up.
Dec 29 08:54:40 Linuxtest dockerd[44060]: time="2017-12-29T08:54:40.970832804+05:30" level=info msg="libcontainerd: new containerd process, pid: 44063"
Dec 29 08:54:41 Linuxtest dockerd[44060]: time="2017-12-29T08:54:41.978053869+05:30" level=fatal msg="Your Linux kernel version 3.8.13-55.1.6.el7uek.x86_64 is not supported for running docker. Please upgrade your kernel to 3.10.0 or newer."
Dec 29 08:54:41 Linuxtest systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
Dec 29 08:54:41 Linuxtest systemd[1]: Failed to start Docker Application Container Engine.
-- Subject: Unit docker.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit docker.service has failed.
--
-- The result is failed.
Dec 29 08:54:41 Linuxtest systemd[1]: Unit docker.service entered failed state.
Dec 29 08:54:41 Linuxtest systemd[1]: docker.service failed.
Dec 29 08:54:42 Linuxtest systemd[1]: docker.service holdoff time over, scheduling restart.
Dec 29 08:54:42 Linuxtest systemd[1]: start request repeated too quickly for docker.service
Dec 29 08:54:42 Linuxtest systemd[1]: Failed to start Docker Application Container Engine.
-- Subject: Unit docker.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit docker.service has failed.
--
-- The result is failed.
Dec 29 08:54:42 Linuxtest systemd[1]: Unit docker.service entered failed state.
Dec 29 08:54:42 Linuxtest systemd[1]: docker.service failed.
有人可以解释为什么会发生这种情况?非常感谢!
请注意错误消息
您的Linux内核版本3.8.13-55.1.6.el7uek.x86_64不支持运行Docker。请将您的内核升级到3.10.0或更新。
您需要内核3.10 才能安装Docker