mirror of
https://github.com/yeasy/docker_practice.git
synced 2026-03-25 19:25:27 +00:00
Add blank lines around headers
This commit is contained in:
@@ -30,6 +30,7 @@ $ docker image ls
|
||||
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
|
||||
busybox latest e72ac664f4f0 6 weeks ago 2.433 MB
|
||||
```
|
||||
|
||||
### 20.1.3 运行 busybox
|
||||
|
||||
启动一个 `busybox` 容器,并在容器中执行 `grep` 命令。
|
||||
|
||||
@@ -25,6 +25,7 @@ debian latest 4d6ce913b130 84.98 MB
|
||||
ubuntu latest b39b81afc8ca 188.3 MB
|
||||
centos latest 8efe422e6104 210 MB
|
||||
```
|
||||
|
||||
### 20.2.2 获取并使用官方镜像
|
||||
|
||||
由于镜像很小,下载时间往往很短,读者可以直接使用 `docker run` 指令直接运行一个 `Alpine` 容器,并指定运行的 Linux 指令,例如:
|
||||
@@ -33,6 +34,7 @@ centos latest 8efe422e6104 210 MB
|
||||
$ docker run alpine echo '123'
|
||||
123
|
||||
```
|
||||
|
||||
### 20.2.3 迁移至 Alpine 基础镜像
|
||||
|
||||
目前,大部分 Docker 官方镜像都已经支持 `Alpine` 作为基础镜像,可以很容易进行迁移。
|
||||
@@ -60,6 +62,7 @@ $ apk --update add --no-cache <package>
|
||||
RUN sed -i "s/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g" /etc/apk/repositories \
|
||||
&& apk add --no-cache <package>
|
||||
```
|
||||
|
||||
### 20.2.4 相关资源
|
||||
|
||||
* `Alpine` 官网:https://www.alpinelinux.org/
|
||||
|
||||
@@ -28,6 +28,7 @@ Status: Downloaded newer image for centos:7
|
||||
[root@43eb3b194d48 /]# cat /etc/redhat-release
|
||||
CentOS Linux release 7.9.2009 (Core)
|
||||
```
|
||||
|
||||
### 20.4.2 Fedora 系统简介
|
||||
|
||||
下图直观地展示了本节内容:
|
||||
|
||||
Reference in New Issue
Block a user