Files
docker_practice/appendix/repo/centos.md
T
yeasy b81816bb07 fix(content): 修正已随上游变化失效的版本事实与镜像引用
深审发现 14 处正文与上游现状不符(另有 4 处在 .agent/ 本地记忆,不入库)。
全部经官方一手源核验,并由独立复核者逐条尝试证伪后保留。

**Docker Content Trust 已从 CLI 移除(本书基线正是 Engine 29.x)**
- 18.6:`docker trust`、`DOCKER_CONTENT_TRUST` 的示例此前标为“历史用法”,
  但未说明命令在 29.x 上根本不存在。Engine 29.0 release notes 原文:
  "Docker Content Trust was removed from the Docker CLI";实测 docker/cli
  的 cli/trust 包在 v28.5.0 返回 200、v29.0.0 返回 404
- 2.3、18.6:DCT 不再是“弃用阶段、时间线待公布”——官方 retired 页已给出
  完整时间表(notary.docker.io 2026-12-08 关闭)
- 注意:`--disable-content-trust` 是 MarkDeprecated(隐藏但仍接受为 no-op),
  不是“不可用”。初版提议写成不可用,经复核纠正后才落地

**etcd 维护分支写反了**
- 15_etcd README/15.1/15.2 均称“3.5 已退出维护窗口”,但 2026-07-23 官方与
  v3.7.1、v3.6.14 同批发布了 v3.5.33,公告称三个分支均在维护;3.4 EOL 也应
  是 2026-06(v3.4.45),非 5 月

**其他上游变化**
- 17.6:containerd 首个 2.x LTS 是 2.0(2024-11-05 起),非 2.3
- 6.4:`sonatype/nexus3:3.69` 这个 tag 从不存在(Sonatype 用三段式),改 3.69.0
- appendix/repo/centos:`rockylinux` 官方镜像已冻结(最后推送 2024-05-30),
  改用官方指引的 `rockylinux/rockylinux`(2026-07-12 仍在更新)
- 6.2/6.3:docs.docker.com/registry/ 已 301 到 retired 页,改指
  distribution.github.io(实测 200)
- 6.1:`docker search centos` 的示例输出补上上游现有的 DEPRECATED 标记

**刻意未改**:`minio/minio` 虽在 Docker Hub 标记 archived,但提议替换的
quay.io/minio/minio 最新 tag 停在 2024-07-31,比 Docker Hub 的 2025-09-07
更旧,照改会把读者引向更陈旧的仓库,留待作者定夺。

验证:check_project_rules 202 文件全过、emphasis 全过、40 测试通过、format 干净。
2026-07-28 20:12:47 -07:00

32 lines
1.5 KiB
Go
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
## CentOS
### 基本信息
[CentOS](https://en.wikipedia.org/wiki/CentOS) 是流行的 Linux 发行版,其软件包大多跟 RedHat 系列保持一致。
> **重要提示**CentOS 8 已于 2021 12 31 日停止维护 (EOL)CentOS 7 也已于 2024 6 30 **完全结束支持**Docker Hub 上的 CentOS 官方镜像 **已停止更新** 且存在未修复的安全漏洞
>
> 2026 年了对于任何新项目**强烈建议** 使用以下生产级替代方案
> - [Rocky Linux](https://hub.docker.com/r/rockylinux/rockylinux)CentOS 原创始人发起的社区驱动项目,目前主流为 Rocky Linux 9。
> - [AlmaLinux](https://hub.docker.com/_/almalinux):由 CloudLinux 支持的企业级发行版,提供长期支持。
> - [CentOS Stream](https://quay.io/repository/centos/centos)RHEL 的上游开发分支,镜像已迁移至 Quay.io (适合开发测试,不建议用于生产环境)。
该仓库位于 [Docker Hub CentOS 官方镜像页](https://hub.docker.com/_/centos),提供了 CentOS 从 5 ~ 8 各个版本的镜像(仅作为历史归档,不再更新)。
### 使用方法
使用 Rocky Linux 9 替代 (**推荐**)
```bash
$ docker run --name rocky -it rockylinux/rockylinux:9 bash
```
使用旧版 CentOS 7 (**仅用于维护旧项目不推荐**)
```bash
$ docker run --name centos -it centos:7 bash
```
### Dockerfile
请到 [CentOS 官方镜像文档目录](https://hub.docker.com/_/centos) 查看。