您是一名开发人员,并且想要开始使用Docker? 本文是为您准备的。 (You are a developer and you want to start with Docker? This article is made for you.)
After a short introduction on what Docker is and why to use it, you will be able to create your first application with Docker.
在简要介绍了什么是Docker以及为什么使用它之后,您将能够使用Docker创建第一个应用程序。
什么是Docker? (What is Docker?)
Docker is a free software developed by Docker Inc. It was presented to the general public on March 13, 2013 and has become since that day a must in the world of IT development.
Docker是由Docker Inc.开发的免费软件。它于2013年3月13日向公众展示,从那一天开始,它已成为IT开发领域的必备工具。
It allows users to create independent and isolated environments to launch and deploy its applications. These environments are then called containers.
它允许用户创建独立的隔离环境来启动和部署其应用程序。 这些环境然后称为容器。
This will let the developer run a container on any machine.
这将使开发人员可以在任何计算机上运行容器。
As you can see, with Docker, there are no more dependency or compilation problems. All you have to do is launch your container and your application will launch immediately.
如您所见,有了Docker,不再有依赖或编译问题。 您所要做的就是启动容器,您的应用程序将立即启动。
但是,Docker是虚拟机吗? (But, is Docker a virtual machine?)
Here is one of the most asked question about Docker. The answer is: actually, not quite.
这是关于Docker的最常见问题之一。 答案是:实际上并不完全。
It may look like a virtual machine at first but the functionality is not the same.
乍一看可能看起来像是虚拟机,但功能并不相同。
Unlike Docker, a virtual machine will include a complete operating system. It will work independently and act like a computer.
与Docker不同,虚拟机将包含完整的操作系统。 它可以独立工作并像计算机一样工作。
Docker will only share the resources of the host machine in order to run its environments.
Docker将仅共享主机的资源以运行其环境。
为什么要使用Docker作为开发人员? (Why use Docker as a developer?)
This tool can really change a developer’s daily life. In order to best answer this question, I have written a non-exhaustive list of the benefits you will find:
该工具确实可以改变开发人员的日常生活。 为了最好地回答这个问题,我写了一份详尽的清单,列出了您会发现的好处:
- Docker is fast. Unlike a virtual machine, your application can start in a few seconds and stop just as quickly. Docker很快。 与虚拟机不同,您的应用程序可以在几秒钟内启动,然后停止一样快。
- Docker is multi-platform. You can launch your container on any system. Docker是多平台的。 您可以在任何系统上启动容器。
- Containers can be built and destroyed faster than a virtual machine.