26 lines
1.1 KiB
Markdown
26 lines
1.1 KiB
Markdown
|
---
|
|||
|
title: 二、Docker基本组成
|
|||
|
date: 2021-01-06
|
|||
|
author: ac
|
|||
|
tags:
|
|||
|
- Docker
|
|||
|
categories:
|
|||
|
- DevOps
|
|||
|
---
|
|||
|
|
|||
|
> Docker的基本组成(Docker架构)
|
|||
|
|
|||
|
### 三个基本概念
|
|||
|
|
|||
|
1. 镜像(Image):Docker镜像(Image)就相当于是一个root文件系统(Linux)。类似一个模版,可以通过模版来创建容器服务,例如:tomcat镜像==》run==》tomcat01容器(提供服务)
|
|||
|
2. 容器(Conrainer):镜像(Image)和容器(Container)的关系,就像是面向对象程序设计中的类和实例一样,镜像是静态的定义(类),容器是镜像运行时的实例。容器可以被创建、启动、停止、删除、暂停等,可以简单的理解为一个简易的Linux系统。
|
|||
|
3. 仓库(Repository):仓库可看成代码控制中心,用于保存镜像。仓库分为公有仓库和私有仓库,默认是Docker Hub(国外的),国内也有容器服务器(设置镜像加速)
|
|||
|
|
|||
|
### 组织架构
|
|||
|
|
|||
|
Docker使用C/S架构模式,使用远程API来管理和创建Docker容器;
|
|||
|
|
|||
|
Docker容器通过Docker镜像来创建。
|
|||
|
|
|||
|

|