- Google Cloud Platform for Architects
- Vitthal Srinivasan Janani Ravi Judy Raj
- 521字
- 2021-06-25 20:48:34
What is a container?
A container image is a lightweight, standalone, executable package that also encapsulates everything that is needed to run it. This would include code, the runtime, system tools, system libraries, and settings.
This definition comes from the website of Docker, which of course is a market-leading container firm. Consider a number of containers running on top of the same OS kernel. Each one of these containers will then, effectively, have its own little environment and executable files, as well as the entire runtime set up. Each one of these containers can be created by using a software such as Docker. Docker can be thought of as a kind of CD tool that takes in your code and outputs a container that can be carried around and run in its own little sandbox. Containers differ from VMs in some important ways, but the basic idea is fairly similar. Inpidual containers are often in the Docker file format.
In the case of containers, right below our inpidual containers lies Docker, which, as we know, is an open platform that allows folks to build and run distributed applications in the form of containers. The crucial bit though, is that Docker runs on top of the host OS, which means that each inpidual container does not abstract the OS. In contrast, in the case of VMs, we can see that each VM has its applications, libraries, and a guest OS. Beneath each of the VMs lies the VM monitor, or hypervisor as it is known. This is a piece of software that should be created by a company such as VMware for instance, which ensures that one or more VMs are able to run on the host machine and interact with the hardware and the other infrastructure:
In effect, containers add one further level of indirection to your code. This makes them different from VMs because we virtualize the OS. For instance, in the previous block diagram, Docker was acting as a proxy between the container and the OS.
In a VM, on the other hand, every VM has its own OS that talks to the hypervisor and that hypervisor VM monitor is, in effect, virtualizing or abstracting the hardware. Now it's pretty clear that a VM needs to lug around its OS within it, which makes it a little less portable and a little bigger in size and slower to boot. In general, a virtual machine is definitely more heavyweight than a Docker container, because a VM contains the whole OS (including kernel) while the containers only contain an abstraction of the OS (while using shared kernel). For those of you who are not familiar with containers in general.
You can visit this link from official Docker website: https://www.docker.com/what-docker
Hence, VMs tend to be an order or several orders of magnitude bigger than containers and they are also slower to deploy and get started with. Here is a quick comparison between the two–GCE and GKE.
GCE instances are VMs, like those on the right. GKE clusters host containers, like those on the left. This is an important distinction:

- 從零開始學(xué)Hadoop大數(shù)據(jù)分析(視頻教學(xué)版)
- SQL Server入門經(jīng)典
- 圖解機(jī)器學(xué)習(xí)算法
- 數(shù)據(jù)庫(kù)應(yīng)用基礎(chǔ)教程(Visual FoxPro 9.0)
- 數(shù)據(jù)要素五論:信息、權(quán)屬、價(jià)值、安全、交易
- 大話Oracle Grid:云時(shí)代的RAC
- 大數(shù)據(jù)架構(gòu)和算法實(shí)現(xiàn)之路:電商系統(tǒng)的技術(shù)實(shí)戰(zhàn)
- 高維數(shù)據(jù)分析預(yù)處理技術(shù)
- 探索新型智庫(kù)發(fā)展之路:藍(lán)迪國(guó)際智庫(kù)報(bào)告·2015(下冊(cè))
- Unity 2018 By Example(Second Edition)
- Oracle高性能SQL引擎剖析:SQL優(yōu)化與調(diào)優(yōu)機(jī)制詳解
- 數(shù)據(jù)指標(biāo)體系:構(gòu)建方法與應(yīng)用實(shí)踐
- 數(shù)字化轉(zhuǎn)型實(shí)踐:構(gòu)建云原生大數(shù)據(jù)平臺(tái)
- Nagios Core Administrators Cookbook
- TypeScript Microservices