-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5e43cb5
commit 25775a3
Showing
3 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
--- | ||
title: Docker概述 | ||
author: 会敲代码的程序猿 | ||
isOriginal: true | ||
date: 2024-11-15 | ||
category: Docker | ||
tag: Docker | ||
--- | ||
|
||
# Docker概述 | ||
|
||
## Docker是什么? | ||
|
||
> **核心定义:** Docker 是一个开源的容器化平台,用于快速构建、部署和运行应用程序。 | ||
**三大特性:** | ||
|
||
1. **轻量:** 容器共享操作系统内核,启动快,占用资源少。 | ||
2. **可移植:** 一次构建,随处运行(开发、测试、生产环境一致)。 | ||
3. **高效:** 资源利用率高,支持微服务架构。 | ||
|
||
重新定义Docker,不只是工具,而是生产力的革命。 | ||
|
||
## Docker的核心组件 | ||
|
||
* **镜像(Image)**:程序和环境的只读模板(打包好的代码 + 环境)。 | ||
* **容器(Container)**:运行起来的镜像,独立的执行单元。 | ||
* **仓库(Registry)**:存储和分发镜像的地方,常用[Docker Hub](https://hub.docker.com/)或私有仓库。 | ||
* **Dockerfile**:定义镜像构建过程的配置文件。 | ||
|
||
## 历史的演化 | ||
|
||
1. 物理机时代:一个应用占用一整台服务器,资源浪费严重,扩展困难。 | ||
2. 虚拟机时代:通过虚拟化技术在单台服务器上运行多个操作系统,提高资源利用率,但性能损耗较大。 | ||
3. **容器化时代**:容器共享内核,轻量、快速,提供了高效的资源隔离和一致的运行环境。 | ||
4. 云原生时代:容器化 + 容器编排 + 服务发现 + 配置管理 + 自动化部署,构建了一个完整的云原生应用平台。 |