简体   繁体   English

在Debian enironment上运行docker Ubuntu图像

[英]Running docker Ubuntu image on Debian enironment

Just started to use Docker. 刚开始使用Docker。 Have some questions about linux containers ) 对linux容器有一些疑问)

How can i run Ubuntu image on a Debian installed OS ? 如何在Debian安装的操作系统上运行Ubuntu映像? Or it is just a name of image called 'Ubuntu' that actually use Debian environment ... 或者它只是一个名为'Ubuntu'的图像名称,实际上使用Debian环境......

# cat /proc/version

Linux version 3.16.0-0.bpo.4-amd64 (debian-kernel@lists.debian.org) (gcc version 4.6.3 (Debian 4.6.3-14) ) #1 SMP Debian 3.16.7-ckt2-1~bpo70+1 (2014-12-08)

# docker run -i -t ubuntu

root@bcade5ce3b94:/# cat /proc/version

Linux version 3.16.0-0.bpo.4-amd64 (debian-kernel@lists.debian.org) (gcc version 4.6.3 (Debian 4.6.3-14) ) #1 SMP Debian 3.16.7-ckt2-1~bpo70+1 (2014-12-08)

What about the filesystem ? 文件系统怎么样? It use the same installed components or a new fs architecture that just depends on kernel ? 它使用相同的已安装组件或仅依赖内核的新fs架构?

Maybe there is a good articles about the subject ) 也许有关于这个主题的好文章)

In docker all images use the same kernel - that is why overhead is minimal - virtualization layer is very thin. 在docker中,所有映像都使用相同的内核 - 这就是为什么开销很小 - 虚拟化层非常薄。 All files in ubuntu image from ubuntu, but any image will give you the same output of uname -a, as it is the same kernel. ubuntu中的所有文件都来自ubuntu,但是任何图像都会给你相同的uname -a输出,因为它是同一个内核。

$ docker run --rm -ti  ubuntu 
root@318f07af2ca7:/# cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.1 LTS"

You don't see host filesystem inside of container unless you will map some directory. 除非您将映射某个目录,否则您在容器内部看不到主机文件系统。 The idea of container that it is running in the same way on any host - doesn't matter what installed there - you need only docker. 它在任何主机上以相同的方式运行的容器的想法 - 无论在那里安装什么 - 你只需要docker。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM