【翻译】Understand how Docker works in the VM-based IT world

原文地址

Docker, a household name in IT, is still far from mainstream adoption, although it has gained a degree of traction in enterprises. With mounting acceptance, your organization can't avoid containers and stick to virtual machines in perpetuity.
Docker, 在IT界一个家喻户晓的名字,尽管他在企业中已经有了一定的牵引力,但距离主流应用还很远。因Docker采用挂载,公司无法避免容器,且应该坚持对虚拟机的使用。

In simplest terms, Docker is a means to package and provision code so that it can move across different parts of an IT platform. While it may seem unclear how Docker works, it's used for various reasons in enterprise IT. Application containerization optimizes hybrid cloud setups and provides a flexible and responsive IT platform.

a means to n.  一种到达 n. 的手段

简单来说,Docker是一种为了能够跨越IT平台不同部分的包装和提供代码手段。在很难明白Docker如何工作的同时,他因为许多不同的原因在IT企业中被使用。
应用容器化优化混合云的安装,并提供了一个反应灵活的IT平台。

Does that mean Docker is used for the same purposes as VMs? Yes and no. Docker operates differently, and that informs where it is used.

那这是不是意味着Docker被使用的目的和虚拟机一样?有对有错。Docker操作的方式不同,他通知了他被使用的地方。

Docker operates differently, and that informs where it is used.`
感觉翻译有点怪

How Docker works in contrast to VMs
Docker与虚拟机比如何工作

The basic VM holds everything necessary for the workload to run, such as the OS, app server, application and any associated databases. That package can transition onto any platform that supports the VM: VMware VMs operate on any platform that has an ESXi hypervisor; Microsoft VMs work on any platform with Hyper-V.

transition onto 过度到  transition v. n.

基础的虚拟机有运行工作负载所必要的事物,如操作系统,应用服务器,应用和相关数据库。这种打包方式可以过度到任何支持虚拟机的平台上:VMware虚拟机可以在有ESXI管理程序的平台上运行, Microsoft 虚拟机可以在有Hyper-V的平台上运行。

A Docker container works differently. It holds only what the application requires to run above a platform. Docker containers are not used for hardware virtualization or complete application workload hosting. The container, generally, doesn't include the OS, nor do individual containers require an app server -- provided the underlying platform has one installed.

The container, generally, doesn't include the OS, nor do individual containers require an app server -- provided the underlying platform has one installed.

provided 如果... 就 ... 

Docke容器和虚拟机工作不同。他仅仅包含了应用在平台上运行所需的东西。Docker容器不被用作硬件虚拟化或者完整的应用工作负载托管。通常来说,容器不会包括操作系统,单个容器也不包括应用服务器,只要在底层平台安装了一个服务器。

不太清楚这里要在底层平台安装的东西,根据就近原则猜测事服务器。

Containers aren't the pinnacle of virtualization
容器不是虚拟化的巅峰

Docker containers are not as portable as VMs are: Docker images are OS-dependent, and in some cases, the container might require a specific version and patch level of the OS, although hard versioning is a bad coding practice.

Docker容器不似虚拟机那般可以移植: Docker镜像是依赖与操作系统,并且在某些情况下,容器会需要特定版本和补丁等级的操作系统,尽管硬编码是一种糟糕的编码体验。

这里的硬编码 感觉不是在说Docker File中定义的初始镜像。

A long-standing user complaint of Docker was that a poorly written container could pass privileged calls from the container through to the underlying platform. Therefore, if a malicious entity hijacks the container, it could compromise the underlying platform and subsequently bring all Docker images to their knees. Later versions of Docker addressed this security issue.

长期以来用户对Docker的抱怨是:一个写的不好的容器也能从容器中传递权限调用到底层平台。因此,如果一个恶意实体劫持容器,会危及底层平台并使所有的Docker镜像瘫痪。之后的版本,Docker解决了这个问题。

bring all Docker images to their knees 使所有的Docker镜像瘫痪

However, these points prompt container newcomers to ask how Docker works, if VMs are seemingly more platform-independent and more secure?

但是,这些点提示了新来的容器使用者要去质疑Docker如何工作,是否虚拟机看上去是更加平台独立,更加安全。

Containers are more efficient than VMs
容器比起虚拟机更加高效

The way in which Docker works gives it both obvious and subtle advantages over server virtualization with VMs.

advantages over server virtualization with VMs 比起虚拟机在服务虚拟化上更有优势

Docker工作的方法让他比起虚拟机在服务虚拟化上有微弱但明显的优势。

Docker containers require fewer resources, both physical and virtual, than comparable VMs. Because the OS is external and shared among the containers, each instance requires significantly less storage space, whereas each VM needs resources to run its own OS. For every VM that runs on a given platform, Docker can run several containers.

Docker容器比起虚拟机来说,所需的物理和虚拟的资源更少。因为操作系统是在容器外,和其他容器共同享有的,所以每个实例都需要少得显著的存储空间,而每一个虚拟机都需要资源去执行他自己的操作系统。对于在给定平台上运行的每个VM,Docker可以运行多个容器

For every VM that runs on a given platform, Docker can run several containers. 感觉这句的意思是一个平台虚拟机只能跑一个但是Docker能跑多个,当感觉我翻译是错的,直接用了google翻译。

The shared OS means that container maintenance can be easier than with VMs -- but this isn't guaranteed. Admins must touch every single VM to implement an OS patch or upgrade, but with Docker environments, they simply update the one underlying shared OS.
共享操作系统意味着容器的维护比起维护虚拟机更容易,但是这并不能被保证。管理员必须在每一个虚拟机上执行操作系统补丁或者升级,但是用Docker环境,他们能够很简单地升级底层共享操作系统。

Maintenance is not so easy with high version- and patch-level sensitivity. In a VM, each isolated workload has its own OS at whatever version and with whatever patches it needs to function; in containers, the underlying platform can only support one OS. Some organizations embed containers inside of VMs to circumvent this hurdle, but this isn't a best practice for long-term operations: It introduces unnecessary complexity, along with performance issues.

circumvent this hurdle 绕过障碍

在高版本和补丁等级的灵敏度下维护不是那么容易。在一个虚拟机,每一个单独的工作负载有他自己的操作系统,无论版本和他所需要的功能。在容器中,底层平台能够支持一个操作系统。许多公司为了绕过这个障碍把容器嵌入虚拟机但是这不是一个对于长期操作最好的方法。他引入了不必要的复杂以及性能问题。

Additionally, Docker is used for increased granularity in application deployments. It isn't impossible to operate a microservices environment deployed on VMs, but as storage and resource constraints become apparent, organizations find only regret and a thinner wallet. Docker application containerization enables admins to create, deploy and link small functional pieces of code to provide a composite application that is still lightweight.

另外,Docker也被用来加快应用部署的粒度。这对于操作微服务环境在虚拟机上部署不是不可能,但随着存储和资源的限制变得明显,公司发现他们后悔了,而且花了很多钱。Docker应用容器化使管理员能够创建部署和限制小的功能代码片来提供一个综合但轻量级的应用。

How Docker works has advantages over VMs when used for business continuity and disaster recovery efforts. New instances of a Docker container can be provisioned on different parts of the IT platform easily and quickly: A container that normally runs on premises can be shot into a public cloud environment and provisioned, or brought from cold storage to a live environment, more rapidly than a VM.

对于业务连续性和灾难恢复上,Docker比起虚拟机来说更有优势。一个新的Docker容器实例能够在不同的IT平台上很容易并且快速地被配置:一个跑在平台上的容器比起虚拟机能更快被放入共有云环境并被配置,或从冷藏到现场环境。

In some cases, VMs are still the right model. For example, a static application environment where the capability to provision it to new hardware is of paramount importance suits VM-based deployment. VMs won't disappear overnight. Generally speaking, however, Docker is for the DevOps age: It can handle continuous development and delivery, and its microservices focus makes it fit for future application architectures. Combine this with either the Docker support ecosystem -- which is technically complex but competent -- or an orchestration and management tool, like Kubernetes, and Docker is ready for prime time.
在许多情况中,虚拟机依然是一个正确的模型。举个例子,一个静态应用环境,将其配置到一个新的硬件中是十分重要的,适合基于部署的虚拟机。虚拟机不会一夜之后突然消失。通常来说,Docker适合DevOps时代,他能解决持续部署和分发并且他的微服务焦点使他能够适合未来应用架构。将其和Docker生态系统或者容器编排工具结合,是复杂但有竞争力的方法。Docker正在迎来黄金时代。

发布了119 篇原创文章 · 获赞 10 · 访问量 5万+

猜你喜欢

转载自blog.csdn.net/yr12Dong/article/details/84317461
今日推荐