mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-02-25 00:50:15 +08:00
Merge pull request #9310 from jessie-pang/master
20171228 Container Basics- Terms You Need to Know.md
This commit is contained in:
commit
732ef5b5bc
@ -1,50 +0,0 @@
|
||||
Translating by jessie-pang
|
||||
|
||||
Container Basics: Terms You Need to Know
|
||||
======
|
||||
|
||||

|
||||
|
||||
[In the previous article][1], we talked about what containers are and how they breed innovation and help companies move faster. And, in the following articles in this series, we will discuss how to use them. Before we dive more deeply into the topic, however, we need to understand some of the terms and commands used in the container world. Without a confident grasp of this terminology, things could get confusing.
|
||||
|
||||
Let's explore some of the basic terms used in the [Docker][2] container world.
|
||||
|
||||
**Container** **:** What exactly is container? It 's a runtime instance of a Docker image. It contains a Docker image, an execution environment, and instructions. It's totally isolated from the system so multiple containers can run on the system, completely oblivious of each other. You can replicate multiple containers from the same image and scale the service when the demand is high and nuke those containers when demand is low.
|
||||
|
||||
**Docker Image** **:** This is no different from the image of a Linux distribution that you download. It's a package of dependencies and information for creating, deploying, and executing a container. You can spin up as many containers as you want in a matter of seconds. Each behaves exactly the same. Images are built on top of one another in layers. Once an image is created, it doesn't change. If you want to make changes to your container, you simply create a new image and deploy new containers from that image.
|
||||
|
||||
**Repository (repo)** **:** Linux users will already be familiar with the term repository; it's a reservoir where packages are stored that can be downloaded and installed on a system. In the context of Docker containers, the only difference is that it hosts Docker images which are categorized via labels. You can have different variants of the same applications or different versions, all tagged appropriately.
|
||||
|
||||
**Registry** **:** Think of this as like GitHub. It 's an online service that hosts and provides access to repositories of docker images. DockerHub, for example is the default registry for public images. Vendors can upload their repositories on DockerHub so that their customers can download and use official images. Some companies offer their own registries for their images. Registries don't have to be run and managed by third party vendors. Organizations can have on-prem registries to manage organization-wide access to repositories.
|
||||
|
||||
**Tag** **:** When you create a Docker image, you can tag it appropriately so that different variants or versions can be easily identified. It's no different from what you see in any software package. Docker images are tagged when you add them to the repository.
|
||||
|
||||
Now that you have an understanding of the basics, the next phase is understanding the terminology used when working with actual Docker containers.
|
||||
|
||||
**Dockerfile** **:** This is a text file that comprises the commands that are executed manually in order to build a Docker image. These instructions are used by Docker to automatically build images.
|
||||
|
||||
**Build** **:** This is the process that creates an image from Dockerfile.
|
||||
|
||||
**Push** **:** Once the image is created, "push" is the process to publish that image to the repository. The term is also used as part of a command that we will learn in the next articles.
|
||||
|
||||
**Pull** **:** A user can retrieve that image from repository through the "pull" process.
|
||||
|
||||
**Compose** **:** Most complex applications comprise more than one container. Compose is a command-line tool that 's used to run a multi-container application. It allows you to run a multi-container application with one command. It eases the headache of running multiple containers needed for that application.
|
||||
|
||||
### Conclusion
|
||||
|
||||
The scope of container terminology is massive, but these are some basic terms that you will frequently encounter. The next time you see these terms, you will know exactly what they mean. In the next article, we will get started working with Docker containers.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.linux.com/blog/intro-to-linux/2017/12/container-basics-terms-you-need-know
|
||||
|
||||
作者:[Swapnil Bhartiya][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:https://www.linux.com/users/arnieswap
|
||||
[1]:https://www.linux.com/blog/intro-to-linux/2017/12/what-are-containers-and-why-should-you-care
|
||||
[2]:https://www.docker.com/
|
@ -0,0 +1,49 @@
|
||||
容器基础知识:你需要知道的术语
|
||||
======
|
||||
|
||||

|
||||
|
||||
[在前一篇文章中][1],我们谈到了容器(container)是什么以及它是如何培育创新并助力企业快速发展的。在以后的文章中,我们将讨论如何使用容器。然而,在深入探讨这个话题之前,我们需要了解关于容器的一些术语和命令。掌握了这些术语,才不至于产生混淆。
|
||||
|
||||
让我们来探讨 [Docker][2] 容器世界中使用的一些基本术语吧。
|
||||
|
||||
**容器(Container)** **:** 到底什么是容器呢?它是一个 Docker 镜像(image)的运行实例。它包含一个 Docker 镜像、执行环境和说明。它与系统完全隔离,所以多个容器可以在系统上运行,并且完全无视对方的存在。你可以从同一镜像中复制出多个容器,并在需求较高时扩展服务,在需求低时对这些容器进行缩减。
|
||||
|
||||
**Docker 镜像(Image)** **:** 这与你下载的 Linux 发行版的镜像别无二致。它是一个安装包,包含了用于创建、部署和执行容器的一系列依赖关系和信息。你可以在几秒钟内创建任意数量的完全相同的容器。镜像是分层叠加的。一旦镜像被创建出来,是不能更改的。如果你想对容器进行更改,则只需创建一个新的镜像并从该镜像部署新的容器即可。
|
||||
|
||||
**仓库(Repository / repo)** **:** Linux 的用户对于仓库这个术语一定不陌生吧。它是一个软件库,存储了可下载并安装在系统中的软件包。在 Docker 容器中,唯一的区别是它管理的是通过标签分类的 Docker 镜像。你可以找到同一个应用程序的不同版本或不同变体,他们都有适当的标记。
|
||||
|
||||
**镜像管理服务(Registry)** **:** 可以将其想象成 GitHub。这是一个在线服务,管理并提供了对 Docker 镜像仓库的访问,例如默认的公共镜像仓库——DockerHub。供应商可以将他们的镜像库上传到 DockerHub 上,以便他们的客户下载和使用官方镜像。一些公司为他们的镜像提供自己的服务。镜像管理服务不必由第三方机构来运行和管理。组织机构可以使用预置的服务来管理内部范围的镜像库访问。
|
||||
|
||||
**标签(Tag)** **:** 当你创建 Docker 镜像时,可以给它添加一个合适的标签,以便轻松识别不同的变体或版本。这与你在任何软件包中看到的并无区别。Docker 镜像在添加到镜像仓库时被标记。
|
||||
|
||||
现在你已经掌握了基本知识,下一个阶段是理解实际使用 Docker 容器时用到的术语。
|
||||
|
||||
**Dockerfile** **:** 这是一个文本文件,包含为了为构建 Docker 镜像需手动执行的命令。Docker 使用这些指令自动构建镜像。
|
||||
|
||||
**Build** **:** 这是从 Dockerfile 创建成镜像的过程。
|
||||
|
||||
**Push** **:** 一旦镜像被被创建,“push”是将镜像发布到仓库的过程。该术语也是我们下一篇文章要学习的命令之一。
|
||||
|
||||
**Pull** **:** 用户可以通过“pull”过程从仓库检索该镜像。
|
||||
|
||||
**Compose** **:** 复杂的应用程序会包含多个容器。Compose 是一个用于运行多容器应用程序的命令行工具。它允许你用单条命令运行一个多容器的应用程序,简化了多容器带来的问题。
|
||||
|
||||
|
||||
### 总结
|
||||
|
||||
容器术语的范围很广泛,这里是经常遇到的一些基本术语。下一次当你看到这些术语时,你会确切地知道它们的含义。在下一篇文章中,我们将开始使用 Docker 容器。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.linux.com/blog/intro-to-linux/2017/12/container-basics-terms-you-need-know
|
||||
|
||||
作者:[Swapnil Bhartiya][a]
|
||||
译者:[jessie-pang](https://github.com/jessie-pang)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:https://www.linux.com/users/arnieswap
|
||||
[1]:https://www.linux.com/blog/intro-to-linux/2017/12/what-are-containers-and-why-should-you-care
|
||||
[2]:https://www.docker.com/
|
Loading…
Reference in New Issue
Block a user