Get to know docker

Virtual machine:

   Each virtual machine includes the application, the necessary binaries and libraries and an entire guest operating system - all of which may be tens of GBs in size.

Docker container:

   Containers include the application and all of its dependencies, but share the kernel with other containers. 

   They run as an isolated process in userspace on the host operating system. They’re also not tied to any specific infrastructure – Docker containers run on any computer, on any infrastructure and in any cloud.

Look at the following picture:



Docker images

    Docker container is working based on docker images, which composed of multiple layers.

    More specifically, each Docker image references a list of read-only layers. Layers are stacked on top of each other to form a base for a container’s root filesystem. 

   New images can be built on existing layers.


Docker containers:

  As we know, each docker container should built on a docker image.

  When you create a new container, a new, thin, writable layer was added on top of the underlying images layers stack. This layer is often called the “container layer”. 

  All changes made to the running container - such as writing new files, modifying existing files, and deleting files - are written to this thin writable container layer.


  With this architecture, it is able to run any number of containers based on the same image:




Because the Docker daemon uses Linux-specific kernel features, you can’t run Docker natively in OS X. Instead, you must use docker-machine to create and attach to a virtual machine (VM). This machine is a Linux VM that hosts Docker for you on your Mac.




發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章