Use a better structure

This commit is contained in:
Baohua Yang
2026-02-09 09:32:05 -08:00
parent fdb879dcf2
commit e669ee0fe8
167 changed files with 2462 additions and 2462 deletions

View File

@@ -1,4 +1,4 @@
# 操作系统
## 操作系统
目前常用的 Linux 发行版主要包括 `Debian/Ubuntu` 系列和 `CentOS/Fedora` 系列

View File

@@ -1,6 +1,6 @@
# Alpine
## Alpine
## 简介
### 简介
![Alpine Linux 操作系统](../../_images/alpinelinux-logo.png)
@@ -22,7 +22,7 @@ ubuntu latest b39b81afc8ca 188.3 MB
centos latest 8efe422e6104 210 MB
```
## 获取并使用官方镜像
### 获取并使用官方镜像
由于镜像很小下载时间往往很短读者可以直接使用 `docker run` 指令直接运行一个 `Alpine` 容器并指定运行的 Linux 指令例如
@@ -31,7 +31,7 @@ $ docker run alpine echo '123'
123
```
## 迁移至 `Alpine` 基础镜像
### 迁移至 `Alpine` 基础镜像
目前大部分 Docker 官方镜像都已经支持 `Alpine` 作为基础镜像可以很容易进行迁移
@@ -61,7 +61,7 @@ RUN sed -i "s/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g" /etc/apk/repositories
&& apk add --no-cache <package>
```
## 相关资源
### 相关资源
* `Alpine` 官网https://www.alpinelinux.org/
* `Alpine` 官方仓库https://github.com/alpinelinux

View File

@@ -1,6 +1,6 @@
# Busybox
## Busybox
## 简介
### 简介
![Busybox - Linux 瑞士军刀](../../_images/busybox-logo.png)
@@ -8,7 +8,7 @@
`BusyBox` 可运行于多款 `POSIX` 环境的操作系统中 `Linux`包括 `Android``Hurd``FreeBSD`
## 获取官方镜像
### 获取官方镜像
可以使用 `docker pull` 指令下载 `busybox:latest` 镜像
@@ -29,7 +29,7 @@ REPOSITORY TAG IMAGE ID CREATED
busybox latest e72ac664f4f0 6 weeks ago 2.433 MB
```
## 运行 busybox
### 运行 busybox
启动一个 `busybox` 容器并在容器中执行 `grep` 命令
@@ -107,7 +107,7 @@ tmpfs on /sys/firmware type tmpfs (ro,relatime)
`busybox` 镜像虽然小巧但包括了大量常见的 `Linux` 命令读者可以用它快速熟悉 `Linux` 命令
## 相关资源
### 相关资源
* `Busybox` 官网https://busybox.net/
* `Busybox` 官方仓库https://git.busybox.net/busybox/

View File

@@ -1,6 +1,6 @@
# CentOS Fedora
## CentOS Fedora
## CentOS 系统简介
### CentOS 系统简介
`CentOS` `Fedora` 都是基于 `Redhat` 的常见 Linux 分支`CentOS` 是目前企业级服务器的常用操作系统`Fedora` 则主要面向个人桌面用户
@@ -8,7 +8,7 @@
CentOSCommunity Enterprise Operating System中文意思是社区企业操作系统它是基于 `Red Hat Enterprise Linux` 源代码编译而成由于 `CentOS` `Redhat Linux` 源于相同的代码基础所以很多成本敏感且需要高稳定性的公司就使用 `CentOS` 来替代商业版 `Red Hat Enterprise Linux``CentOS` 自身不包含闭源软件
### 使用 CentOS 官方镜像
#### 使用 CentOS 官方镜像
**注意CentOS 8 已于 2021 12 31 日停止维护EOL对于新部署推荐使用 CentOS Stream Rocky LinuxAlmaLinux 等替代发行版**
@@ -25,13 +25,13 @@ Status: Downloaded newer image for centos:latest
CentOS Linux release 7.9.2009 (Core)
```
## Fedora 系统简介
### Fedora 系统简介
![Fedora 操作系统](../../_images/fedora-logo.png)
`Fedora` `Fedora Project` 社区开发红帽公司赞助的 `Linux` 发行版它的目标是创建一套新颖多功能并且自由和开源的操作系统`Fedora` 的功能对于用户而言它是一套功能完备的可以更新的免费操作系统而对赞助商 `Red Hat` 而言它是许多新技术的测试平台被认为可用的技术最终会加入到 `Red Hat Enterprise Linux`
### 使用 Fedora 官方镜像
#### 使用 Fedora 官方镜像
使用 `docker run` 命令直接运行 `Fedora` 官方镜像并登录 `bash`
@@ -45,7 +45,7 @@ Status: Downloaded newer image for fedora:latest
Fedora release 39 (Thirty Nine)
## 相关资源
### 相关资源
* `Fedora` 官网https://getfedora.org/
* `Fedora` 官方仓库https://github.com/fedora-infra

View File

@@ -1,8 +1,8 @@
# Debian Ubuntu
## Debian Ubuntu
`Debian` `Ubuntu` 都是目前较为流行的 **Debian ** 的服务器操作系统十分适合研发场景`Docker Hub` 上提供了官方镜像国内各大容器云服务也基本都提供了相应的支持
## Debian 系统简介
### Debian 系统简介
![Debian 操作系统](../../_images/debian-logo.png)
@@ -12,7 +12,7 @@
众多的 `Linux` 发行版例如 `Ubuntu``Knoppix` `Linspire` `Xandros` 都基于 `Debian GNU/Linux`
### 使用 Debian 官方镜像
#### 使用 Debian 官方镜像
官方提供了大家熟知的 `debian` 镜像以及面向科研领域的 `neurodebian` 镜像可以使用 `docker run` 直接运行 `Debian` 镜像
@@ -24,13 +24,13 @@ Debian GNU/Linux 8
`Debian` 镜像很适合作为基础镜像构建自定义镜像
## Ubuntu 系统简介
### Ubuntu 系统简介
![Ubuntu 操作系统](../../_images/ubuntu-logo.jpg)
`Ubuntu` 是一个以桌面应用为主的 `GNU/Linux` 操作系统其名称来自非洲南部祖鲁语或豪萨语的ubuntu一词官方译名友帮拓另有吾帮托乌班图有奔头乌斑兔等译名`Ubuntu` 意思是人性以及我的存在是因为大家的存在是非洲传统的一种价值观类似华人社会的仁爱思想 `Ubuntu` 基于 `Debian` 发行版和 `GNOME/Unity` 桌面环境 `Debian` 的不同在于它每 6 个月会发布一个新版本 2 年推出一个长期支持 **Long Term SupportLTS** 版本一般支持 3 年时间
### 使用 Ubuntu 官方镜像
#### 使用 Ubuntu 官方镜像
下面以 `ubuntu:24.04` 为例演示如何使用该镜像安装一些常用软件
@@ -123,7 +123,7 @@ root@7d93de07bf76:/# curl 127.0.0.1
配合使用 `-p` 参数对外映射服务端口可以允许容器外来访问该服务
## 相关资源
### 相关资源
* `Debian` 官网https://www.debian.org/
* `Neuro Debian` 官网http://neuro.debian.net/

View File

@@ -1,4 +1,4 @@
# 本章小结
## 本章小结
本章讲解了典型操作系统镜像的下载和使用