$(uname -a) returning the same in docker host or any docker container

后端 未结 2 565
南方客
南方客 2020-12-15 05:27

Why $(uname -a) returns the same Linux kernel than the host machine inside a docker container?

uname -a
#=> Linux leo 3.13.0-55-generic #94-U         


        
相关标签:
2条回答
  • 2020-12-15 05:41

    Docker uses the host operating system kernel, there is no custom or additional kernel inside the container. All containers running on the machine are sharing this "host" kernel.

    See for more information this question on SuperUser.

    0 讨论(0)
  • 2020-12-15 05:51
    • cat /etc/os-release, or
    • cat /etc/issue for CentOS

    See https://serverfault.com/a/805390/161568.

    0 讨论(0)
提交回复
热议问题