chore: lint cleanup and version corrections

- Accept benign linter changes (version notes, explicit tags, formatting)
- Fix incorrect version downgrades introduced by linter:
  - golang:1.22→1.26 (restored)
  - rust:1.82→1.95 (restored)
- 23 files updated
This commit is contained in:
Baohua Yang
2026-04-25 15:58:27 +00:00
parent 1e9cdeea3f
commit aa204fb454
22 changed files with 61 additions and 13 deletions
+9
View File
@@ -2,6 +2,12 @@
Docker 镜像仓库获取镜像可谓是 Docker 运作的第一步本节将介绍如何使用 `docker pull` 命令下载镜像以及如何理解下载过程
> **版本号最佳实践**
>
> - **永远指定版本号**避免使用 `latest` 标签应指定具体的版本 `ubuntu:24.04``nginx:1.27`以确保镜像内容稳定一致
> - **在生产环境使用摘要**优先使用镜像摘要SHA256而非标签 `nginx@sha256:abc123...`因为摘要不可变
> - **定期评估依赖**即使指定了版本号仍应定期检查依赖的基础镜像是否有安全更新
### 4.1.1 docker pull 命令
从镜像仓库获取镜像的命令是 `docker pull`
@@ -135,6 +141,9 @@ PRETTY_NAME="Ubuntu 24.04 LTS"
...
root@e7009c6ce357:/# exit
```
> 本例使用 `ubuntu:24.04` 这样的具体版本标签是最佳实践若无特殊需求避免使用 `docker pull ubuntu` `ubuntu:latest`因为镜像内容可能在某个时刻发生变化
**参数说明**
| 参数 | 说明 |