Home  >  Q&A  >  body text

Docker 宿主机的系统是否对容器使用的系统选择有影响?

例如,我宿主机使用的系统是ubuntu,那么,我的容器是否也应该使用ubuntu的系统以达到更好的性能和减少宿主机的性能消耗?

PHP中文网PHP中文网2707 days ago653

reply all(2)I'll reply

  • 天蓬老师

    天蓬老师2017-04-25 09:04:02

    Docker is based on the Linux kernel, so when choosing a host machine, you must choose a system that supports Docker, namely:

    • Linux version 3.8 or higher.

    • Cgroups and namespaces must be available

    As for distributions, they just install a variety of different packages in a Linux kernel, and the core is still Linux.

    You can understand it as, there is a large open space (system hardware resources), which was transformed into a foundation (Linux kernel), the host system used part of the area to build some houses (host system), and you drove a RV to live in it. (Docker). As long as the foundation allows it (the Linux kernel allows it), you don't have to worry about how the house next to it is built. Of course, if the house collapses and the water, electricity and gas are shut down (the host computer crashes), your RV will also be affected.

    reply
    0
  • 黄舟

    黄舟2017-04-25 09:04:02

    You can use both, there is no difference

    reply
    0
  • Cancelreply