Skip to content

Commit

Permalink
Docker概述
Browse files Browse the repository at this point in the history
  • Loading branch information
monkeycode2024 committed Nov 15, 2024
1 parent 5e43cb5 commit 25775a3
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/.vuepress/path/sidebar/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,7 @@ export default sidebar({
]
},
],
"/md/docker/": [
{text: "概述", prefix: "/md/docker/overview", link: "/md/docker/overview"},
],
});
1 change: 1 addition & 0 deletions src/article.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ features:
- title: Docker
icon: docker
details: Docker容器化最佳实践
link: /md/docker/overview

- title: K8S
icon: k8s
Expand Down
36 changes: 36 additions & 0 deletions src/md/docker/overview.md
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. 云原生时代:容器化 + 容器编排 + 服务发现 + 配置管理 + 自动化部署,构建了一个完整的云原生应用平台。

0 comments on commit 25775a3

Please sign in to comment.