Home  >  Q&A  >  body text

关于docker的入门疑惑

我是一个运营人员,所以对开发不是很了解,看了一天的dokcer的文章和文档,仍旧有很多疑惑,我想从我自身的角度对docker提一些问题,希望可以得到解答,先谢过各位。

1. docker的性能?

我已经了解docker基于内核的虚拟化,性能比Xen/Kvm这类提升很多。
那是否新建一个例如Centos/Ubuntu的容器,在里面的性能可以发挥到接近物理宿主?那如何理解物理机器自身的系统开销和容器内系统的自身开销?

2. docker内容器的整合和文件系统的共享?

例如我们常用的PHP运行环境是LAMP,我们会在物理主机上单独安装apache、php、mysql。
那我们是否可以在物理主机上将这些程序分别放到不同的容器?然后我的实际程序文件在单独的一个目录下面,我如何连接不同容器的程序去执行这些程序?如果我需要文件的安全隔离,我如何通过docker实现调用和共享?

3. 应用范围?

我了解到目前docker主要应用于开发,但是在实际应用中,我们更多的要考虑容器的长久稳定、故障恢复(灾备?)、配额限制(好像目前只可以限制内存?)。
因为我有较多的运行中的服务器,此前机房提供过一个基于Vmware的虚拟化方案,单因为性能原因被我放弃。如果还是此前准备运行Vmware的服务器的话,我是否可以使用docker来实际运行我的N多网站?(目前有数十台网站服务器,部分无灾备,且每台服务器负载均不高)

可能提的问题不甚专业,望大神解答

伊谢尔伦伊谢尔伦2761 days ago683

reply all(1)I'll reply

  • 天蓬老师

    天蓬老师2017-04-21 10:58:22

    1. Because docker is based on lxc packaging and is at the container level, you can understand it as a process group. However, in its view, the entire system environment is exclusive to it and is isolated from the host and other containers. It is It runs directly on the physical machine; to understand the overhead, you can think of running a lot more processes. Current machines are rarely full, but in the vm-level virtualization method, a large amount of computing resources and storage resources are consumed in the VM's OS. It’s up;

    2. The environment can be distributed in different containers; the host directory can be mapped to the specified directory of the container through the -v parameter of docker; there are many ways to call and share, -v is one, or regular ftp can be used , scp, etc. At this time, you can just understand the container as a virtual machine;

    3. The application scope of docker completely depends on your imagination. You can package it as paas, or you can directly distribute it as a virtual machine, or as a complete packaging solution for applications, etc.; as for the virtualization solution, you can directly Use docker to run websites. Google has begun to add docker support to its cloud services. Currently, openstack and cloudfundry have also begun to support it.

    reply
    0
  • Cancelreply