mirror of
https://github.com/yeasy/docker_practice.git
synced 2026-08-10 08:27:25 +00:00
Fix nginx version, IPVS removal, cgroups v2 and Redis config
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
|
||||
现在让我们以定制一个 Web 服务器为例子,来讲解镜像是如何构建的。
|
||||
|
||||
> **版本提示**:以下示例中 `nginx` 镜像使用默认 `latest` 标签。生产环境建议指定具体版本号(如 `nginx:1.30`),以避免镜像更新带来的不兼容性。
|
||||
> **版本提示**:以下示例中 `nginx` 镜像使用默认 `latest` 标签。生产环境建议指定具体版本号(如 `nginx:1.28`),以避免镜像更新带来的不兼容性。
|
||||
|
||||
```bash
|
||||
$ docker run --name webserver -d -p 8080:80 nginx
|
||||
@@ -93,7 +93,7 @@ nginx 1.30 05a60462f8ba 12 days ago
|
||||
nginx latest e43d811ce2f4 4 weeks ago 181.5 MB
|
||||
```
|
||||
|
||||
> **版本说明**:上面示例中 `nginx:1.30` 代表 1.30 系列的最新 patch 版本。在���际应用中应根据需求选择确切的版本号,而不是盲目使用 `latest`。
|
||||
> **版本说明**:上面示例中 `nginx:1.28` 代表 1.30 系列的最新 patch 版本。在���际应用中应根据需求选择确切的版本号,而不是盲目使用 `latest`。
|
||||
|
||||
我们还可以用 `docker history` 具体查看镜像内的历史记录。例如先执行 `docker history nginx:v2`,再对比 `docker history nginx:latest`,就能看到我们刚刚提交出来的新层。
|
||||
|
||||
|
||||
Reference in New Issue
Block a user