mirror of
https://github.com/yeasy/docker_practice.git
synced 2026-02-24 11:19:32 +00:00
fix: resolve content issues found in user review
- fix(install): correct Docker version in macOS guide - fix(intro): localize external image to prevent link rot - doc(swarm): add context note about Kubernetes supremacy - fix(network): remove broken missing image reference
This commit is contained in:
@@ -42,7 +42,7 @@ $ brew install --cask docker
|
||||
|
||||
```bash
|
||||
$ docker --version
|
||||
Docker version 29.1.4, build 048e46e
|
||||
Docker version 26.1.1, build 4cf5afa
|
||||
```
|
||||
|
||||
如果 `docker version`、`docker info` 都正常的话,可以尝试运行一个 [Nginx 服务器](https://hub.docker.com/_/nginx/):
|
||||
|
||||
BIN
introduction/_images/docker-on-linux.png
Normal file
BIN
introduction/_images/docker-on-linux.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 75 KiB |
@@ -6,7 +6,7 @@
|
||||
|
||||
**Docker** 使用 `Google` 公司推出的 [Go 语言](https://golang.google.cn/) 进行开发实现,基于 `Linux` 内核的 [cgroup](https://zh.wikipedia.org/wiki/Cgroups),[namespace](https://en.wikipedia.org/wiki/Linux_namespaces),以及 [OverlayFS](https://docs.docker.com/storage/storagedriver/overlayfs-driver/) 类的 [Union FS](https://en.wikipedia.org/wiki/Union_mount) 等技术,对进程进行封装隔离,属于 [操作系统层面的虚拟化技术](https://en.wikipedia.org/wiki/Operating-system-level_virtualization)。由于隔离的进程独立于宿主和其它的隔离的进程,因此也称其为容器。最初实现是基于 [LXC](https://linuxcontainers.org/lxc/introduction/),从 `0.7` 版本以后开始去除 `LXC`,转而使用自行开发的 [libcontainer](https://github.com/docker/libcontainer),从 `1.11` 版本开始,则进一步演进为使用 [runC](https://github.com/opencontainers/runc) 和 [containerd](https://github.com/containerd/containerd)。
|
||||
|
||||

|
||||

|
||||
|
||||
> `runc` 是一个 Linux 命令行工具,用于根据 [OCI容器运行时规范](https://github.com/opencontainers/runtime-spec) 创建和运行容器。
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
当创建一个 Docker 容器的时候,同时会创建了一对 `veth pair` 接口(当数据包发送到一个接口时,另外一个接口也可以收到相同的数据包)。这对接口一端在容器内,即 `eth0`;另一端在本地并被挂载到 `docker0` 网桥,名称以 `veth` 开头(例如 `vethAQI2QT`)。通过这种方式,主机可以跟容器通信,容器之间也可以相互通信。Docker 就创建了在主机和所有容器之间一个虚拟共享网络。
|
||||
|
||||

|
||||
|
||||
|
||||
## 用户自定义网络
|
||||
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
|
||||
使用 `Swarm` 集群之前需要了解以下几个概念。
|
||||
|
||||
> [!NOTE]
|
||||
> 虽然 Swarm 是 Docker 引擎内置的集群管理工具,但在大规模生产环境中,Kubernetes 已经成为容器编排的事实标准。如果您主要是为了学习容器编排,建议重点关注 Kubernetes 章节。
|
||||
|
||||
## 节点
|
||||
|
||||
运行 Docker 的主机可以主动初始化一个 `Swarm` 集群或者加入一个已存在的 `Swarm` 集群,这样这个运行 Docker 的主机就成为一个 `Swarm` 集群的节点 (`node`) 。
|
||||
|
||||
Reference in New Issue
Block a user