Files
docker_practice/appendix/repo/centos.md
2026-01-11 10:05:49 -08:00

33 lines
1.2 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](https://hub.docker.com/_/centos)
## 基本信息
[CentOS](https://en.wikipedia.org/wiki/CentOS) 是流行的 Linux 发行版,其软件包大多跟 RedHat 系列保持一致。
> **重要提示**CentOS 8 已于 2021 12 31 日停止维护EOLCentOS 7 将于 2024 6 30 日结束支持Docker Hub 上的 CentOS 官方镜像**已停止更新**
>
> 对于新项目建议使用以下替代方案
> - [Rocky Linux](https://hub.docker.com/_/rockylinux)CentOS 创始人发起的社区驱动项目
> - [AlmaLinux](https://hub.docker.com/_/almalinux):由 CloudLinux 支持的企业级发行版
> - [CentOS Stream](https://hub.docker.com/r/centos/centos)RHEL 的上游开发分支
该仓库位于 `https://hub.docker.com/_/centos`提供了 CentOS 5 ~ 8 各个版本的镜像仅供参考不再更新
## 使用方法
使用 Rocky Linux 替代推荐
```bash
$ docker run --name rocky -it rockylinux:9 bash
```
使用旧版 CentOS 7仅用于遗留系统
```bash
$ docker run --name centos -it centos:7 bash
```
## Dockerfile
请到 https://github.com/docker-library/docs/tree/master/centos 查看。