Docker最低内核版本3.8.13或3.10

在Docker网站上,我看到接近冲突的信息。

页面: https ://docs.docker.com/installation/oracle/说:“Docker需要在Oracle Linux上使用Unbreakable Enterprise Kernel Release 3(3.8.13)或更高版本。”

该页面: https ://docs.docker.com/installation/binaries/说3.10是必需的。

我猜测这些东西被添加到3.8.13的特殊版本中,否则需要版本3.10。

如果有人能够给出一些很好的解释。

正确; 一般来说 ,内核3.10是绝对最小的内核版本,它支持Docker运行稳定所需的特性(尽pipe更新版本)。

但是,一些Linux发行版的后端端口function,以便他们仍然能够运行的Docker。 例如,红帽企业Linux 6.5 能够在内核2.6上运行Docker (虽然它仍然是一个12岁的内核)

总结

  • 始终运行您的发行版提供的最新的内核版本
  • 使用自定义内核replace您的发行版提供的内核可能会工作,但并不正式支持。
  • 一些(云)提供者用自定义版本replace内核; 这一直是一些问题的原因。
  • 如果你正在构build自己的内核,使用最新版本(docker 确实利用了最新版本中的一些function)

还有一个shell脚本来检查您的系统是否具有所需的依赖关系,并检查哪些function可用;

https://github.com/docker/docker/blob/master/contrib/check-config.sh

更新

从Docker 1.8.0开始,Red Hat Enterprise Linux 6和CentOS 6(以及Kernel 2.6)不再支持运行Docker的平台,也没有为这些发行版发布新的软件包。 在这些平台上运行Docker非常令人沮丧,因为RHEL 6 / CentOS 6发布的最新版本是Docker 1.7.1。 build议将系统升级到受支持的RHEL 7 / CentOS 7。

Oracle Unbreakable Linux 7.0与我所告诉的Red Hat 7.0完全相同。

下面的例子显示了从最新的Ubuntu创build的一个相当标准的容器在创build后不会启动。

[vagrant@oracle-70-x64 ~]$ docker run -t -i ubuntu /bin/bash Unable to find image 'ubuntu:latest' locally latest: Pulling from ubuntu e118faab2e16: Pull complete 7e2c5c55ef2c: Pull complete e04c66a223c4: Pull complete fa81ed084842: Already exists ubuntu:latest: The image you are pulling has been verified. Important: image verification is a tech preview feature and should not be relied on to provide security. Digest: sha256:738edd684282277c07f23277718e43562daf2ee210f7aca9a13fae65f0159ddd Status: Downloaded newer image for ubuntu:latest root@6f47331e6c6a:/# exit exit [vagrant@oracle-70-x64 ~]$ docker ps -all CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 6f47331e6c6a ubuntu:latest "/bin/bash" 36 seconds ago Exited (0) 7 seconds ago boring_lovelace [vagrant@oracle-70-x64 ~]$ docker start 6f47331e6c6a Error response from daemon: Cannot start container 6f47331e6c6a: [8] System error: Unit docker-6f47331e6c6a85410028b661bebe997192bb15dfa2f6cf1d92328586a5afa2c0.scope already exists. FATA[0000] Error: failed to start one or more containers [vagrant@oracle-70-x64 ~]$ 

问题是内核版本。 它是旧的

 [vagrant@oracle-70-x64 ~]$ uname -a Linux oracle-70-x64.vagrantup.com 3.8.13-35.3.1.el7uek.x86_64 #2 SMP Wed Jun 25 15:27:43 PDT 2014 x86_64 x86_64 x86_64 GNU/Linux 

比如Ubuntu

 $ uname -a Linux kore 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux 

摆脱UEK,你会在一个更现代化的内核。

这就是我在OEL 7没有uek:3.10.0-229.14.1.el7.x86_64