Files
docker_practice/appendix/repo/centos.md
T
yeasy a1f63a565b fix(links): repair dead external links found by a cluster-wide sweep
对 13 本书的 1,842 个外链做了一次全量 curl 健康检查(跟随重定向、带浏览器 UA),
逐条排除误报后确认的真死链。替换目标全部逐个验证返回 200。

注意两类**不是**缺陷、因此没有动的:
- platform.claude.com / docs.anthropic.com 当时返回 500,串行重试仍 500,
  但同日早些时候可正常访问——是上游临时故障,不是死链。
- docker_practice 列出的国内 registry 镜像连不上,是因为书里已明确标注
  「已停止服务」「已于 2024 年关闭」,属于故意保留的历史记录。
2026-07-22 16:51:15 -07:00

32 lines
1.4 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/_/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:9 bash
```
使用旧版 CentOS 7 (**仅用于维护旧项目不推荐**)
```bash
$ docker run --name centos -it centos:7 bash
```
### Dockerfile
请到 [CentOS 官方镜像文档目录](https://hub.docker.com/_/centos) 查看。