docker-images - docker官方拉取的centos最新镜像系统信息却是ubuntu怎么回事啊?
迷茫
迷茫 2017-04-22 09:00:30
0
2
625

我拉取的官方centos:latest镜像,运行后运行uname -a没看到centos字样,只有ubuntu,怎么回事啊?

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

reply all(2)
阿神

The kernel of the container is the kernel of the host, and your host is ubuntu

伊谢尔伦

After some research, it seems that the docker kernel is indeed the host kernel

  • The difference between distributions mainly lies in the organizational form such as file directories and the difference in pre-installed software

  • The docker image is just a packaged file system and does not include the system kernel

#查看系统的发行说明
cat /etc/issue

#uname是直接调用系统接口得到信息, shell的uname命令实际封装了函数

#include <sys/utsname.h>
int uname(struct utsname *name);

In this case, it shouldn’t be a problem to see two differences.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!