更新文档

This commit is contained in:
Super Manito
2025-04-22 18:12:18 +08:00
parent cf11187186
commit 2360f1b584
8 changed files with 275 additions and 271 deletions

View File

@@ -636,6 +636,7 @@ function run_end() {
"🔥 林枫云 · 专注独立IP高频VPSR9/i9系列定制 ➜ https://www.dkdun.cn"
"🔥 乔星欢 · 香港4核4G服务器28元起_香港500Mbps大带宽 ➜ https://www.qiaoxh.com"
"🔥 速拓云 · 国内高防云服务器新用户享5折优惠 ➜ https://www.sutuoyun.com"
"🔥 云悠YUNYOO · 全球高性价比云服务器低至15.99元起 ➜ https://yunyoo.cc"
)
echo -e "\n✨ 脚本运行完毕,更多使用教程详见官网 👉 \033[3mhttps://linuxmirrors.cn\033[0m\n"
for ad in "${sponsor_ad[@]}"; do

View File

@@ -345,6 +345,7 @@ function run_end() {
"🔥 林枫云 · 专注独立IP高频VPSR9/i9系列定制 ➜ https://www.dkdun.cn"
"🔥 乔星欢 · 香港4核4G服务器28元起_香港500Mbps大带宽 ➜ https://www.qiaoxh.com"
"🔥 速拓云 · 国内高防云服务器新用户享5折优惠 ➜ https://www.sutuoyun.com"
"🔥 云悠YUNYOO · 全球高性价比云服务器低至15.99元起 ➜ https://yunyoo.cc"
)
echo -e "\n✨ 脚本运行完毕,更多使用教程详见官网 👉 \033[3mhttps://linuxmirrors.cn\033[0m\n"
for ad in "${sponsor_ad[@]}"; do

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@@ -1,233 +1,231 @@
---
hide:
- navigation
- feedback
- footer
---
> 如果觉得这个项目不错对您有所帮助的话,请点击仓库右上角的 Star 并分享给更多的朋友 :octicons-heart-fill-24:{ .heart style="color: red" }
!!! tip inline end "本项目脚本已被众多开源项目使用,广受社区用户好评"
## :simple-docker:{style="color: #1d63ed"} Docker 安装脚本
<table>
<tr>
<td><a href="https://www.debian.org" target="_blank"><img src="/assets/images/icon/debian.svg" width="16" height="16" style="vertical-align: -0.35em"></a> Debian</td>
<td><a href="https://access.redhat.com/products/red-hat-enterprise-linux" target="_blank"><img src="/assets/images/icon/redhat.svg" width="16" height="16" style="vertical-align: -0.1em"></a> Red Hat Enterprise Linux</td>
</tr>
<tr>
<td><a href="https://cn.ubuntu.com" target="_blank"><img src="/assets/images/icon/ubuntu.svg" width="16" height="16" style="vertical-align: -0.15em"></a> Ubuntu</td>
<td><a href="https://fedoraproject.org/zh-Hans" target="_blank"><img src="/assets/images/icon/fedora.ico" width="16" height="16" style="vertical-align: -0.2em"></a> Fedora</td>
</tr>
<tr>
<td><a href="https://www.kali.org" target="_blank"><img src="/assets/images/icon/kali-linux.svg" width="16" height="16"></a> Kali Linux</td>
<td><a href="https://www.centos.org" target="_blank"><img src="/assets/images/icon/centos.svg" width="16" height="16" style="vertical-align: -0.2em"></a> CentOS</td>
</tr>
<tr>
<td><a href="https://linuxmint.com" target="_blank"><img src="/assets/images/icon/linux-mint.ico" width="16" height="16" style="vertical-align: -0.15em"></a> Linux Mint</td>
<td><a href="https://rockylinux.org" target="_blank"><img src="/assets/images/icon/rocky-linux.svg" width="16" height="16" style="vertical-align: -0.25em"></a> Rocky Linux</td>
</tr>
<tr>
<td><a href="https://www.deepin.org" target="_blank"><img src="/assets/images/icon/deepin.png" width="16" height="16" style="vertical-align: -0.3em"></a> Deepin深度</td>
<td><a href="https://almalinux.org/zh-hans" target="_blank"><img src="/assets/images/icon/almalinux.svg" width="16" height="16" style="vertical-align: -0.15em"></a> AlmaLinux</td>
</tr>
<tr>
<td><a href="https://zorin.com/os" target="_blank"><img src="/assets/images/icon/zorin-os.png" width="16" height="16" style="vertical-align: -0.3em"></a> Zorin OS</td>
<td><a href="https://www.openeuler.org/zh" target="_blank"><img src="/assets/images/icon/openeuler.ico" width="16" height="16" style="vertical-align: -0.2em"></a> openEuler开源欧拉</td>
</tr>
<tr>
<td><a href="https://www.armbian.com" target="_blank"><img src="/assets/images/icon/armbian.png" width="16" height="16" style="vertical-align: -0.2em"></a> Armbian</td>
<td><a href="https://www.opencloudos.org" target="_blank"><img src="/assets/images/icon/opencloudos.png" width="16" height="16" style="vertical-align: -0.25em"></a> OpenCloudOS鸥栖</td>
</tr>
<tr>
<td><a href="https://www.proxmox.com" target="_blank"><img src="/assets/images/icon/proxmox.svg" width="16" height="16" style="vertical-align: -0.2em"></a> Proxmox VE</td>
<td><a href="https://openanolis.cn" target="_blank"><img src="/assets/images/icon/anolis.png" width="16" height="16" style="vertical-align: -0.1em"></a> Anolis OS龙蜥</td>
</tr>
<tr>
<td><a href="https://www.raspberrypi.com" target="_blank"><img src="/assets/images/icon/raspberry-pi.png" width="16" height="16" style="vertical-align: -0.2em"></a> Raspberry Pi OS</td>
<td></td>
</tr>
</table>
!!! quote ""
=== ":linuxmirrors: 官网(推荐)"
``` bash
bash <(curl -sSL https://linuxmirrors.cn/docker.sh)
```
=== ":simple-github: GitHub"
``` bash
bash <(curl -sSL https://raw.githubusercontent.com/SuperManito/LinuxMirrors/main/DockerInstallation.sh)
```
=== ":simple-gitee: Gitee 码云"
``` bash
bash <(curl -sSL https://gitee.com/SuperManito/LinuxMirrors/raw/main/DockerInstallation.sh)
```
=== ":simple-jsdelivr: jsDelivrCDN"
``` bash
bash <(curl -sSL https://cdn.jsdelivr.net/gh/SuperManito/LinuxMirrors@main/DockerInstallation.sh)
```
集成安装 [`Docker Engine`](https://docs.docker.com/engine) 和 [`Docker Compose (插件)`](https://docs.docker.com/compose/install/linux),支持选择或更换软件源以及镜像仓库、安装指定版本、重装等功能,支持 ARM 架构处理器
脚本参考 [官方文档](https://docs.docker.com/engine/install) 采用官方提供的方法使用系统包管理工具进行安装,这意味着可安装的版本是由官方仓库决定的,本脚本不存在兼容性等问题。
> 注Docker Compose 自 V2 版本起开始作为 Docker CLI 的一部分,不再需要单独安装,请使用 `docker compose` 命令替代 `docker-compose`
!!! node "软件源说明"
`Docker CE` 软件仓库,全称 Docker Community EditionDocker 社区版),用于下载并安装 Docker 相关软件包
`Docker Registry` 镜像仓库,用于控制拉取镜像的默认来源存储仓库,又称镜像加速器,默认为官方的 Docker Hub 仓库
由于一些不可抗力的因素,目前国内网络环境一般无法正常访问 Docker Hub 因此无法拉取镜像,使用推荐的镜像源勉强能够使用不过速度可能会很慢
- ### 命令选项(高级用法)
| 名称 | 含义 | 选项值 |
| :-: | :-: | :-: |
| `--source` | 指定 `Docker CE` 源地址(域名或IP) | `地址` |
| `--source-registry` | 指定镜像仓库地址(域名或IP) | `地址` |
| `--branch` | 指定 Docker CE 源仓库 | `仓库名(详见下方文档)` |
| `--codename` | 指定 Debian 系操作系统的版本代号 | `代号名称` |
| `--designated-version` | 指定 `Docker CE` 安装版本 | `版本号(详见下方文档)` |
| `--protocol` | 指定 `Docker CE` 源的 WEB 协议 | `http` 或 `https` |
| `--install-latest` | 是否安装最新版本的 Docker Engine | `true` 或 `false` |
| `--close-firewall` | 是否关闭防火墙 | `true` 或 `false` |
| `--clean-screen` | 是否在运行前清除屏幕上的所有内容 | `true` 或 `false` |
| `--ignore-backup-tips` | 忽略覆盖备份提示(即不覆盖备份) | 无 |
| `--pure-mode` | 纯净模式,精简打印内容 | 无 |
> 软件源完整格式 `<WEB协议>://<软件源地址(域名或IP)>/<软件源仓库(路径)>`
<!-- termynal -->
```
$ bash DockerInstallation.sh --help
命令选项(名称/含义/值)
--source 指定 Docker CE 源地址(域名或IP) 地址
--source-registry 指定镜像仓库地址(域名或IP) 地址
--branch 指定 Docker CE 源仓库(路径) 仓库名
--codename 指定 Debian 系操作系统的版本代号 代号名称
--designated-version 指定 Docker CE 安装版本 版本号
--protocol 指定 Docker CE 源的 WEB 协议 http 或 https
--install-latest 是否安装最新版本的 Docker Engine true 或 false
--close-firewall 是否关闭防火墙 true 或 false
--clean-screen 是否在运行前清除屏幕上的所有内容 true 或 false
--ignore-backup-tips 忽略覆盖备份提示 无
--pure-mode 纯净模式,精简打印内容 无
问题报告 https://github.com/SuperManito/LinuxMirrors/issues
```
- #### 指定 Docker CE 软件源地址
``` { .bash .no-copy }
bash <(curl -sSL https://linuxmirrors.cn/docker.sh) --source mirror.example.com/docker-ce
```
> 注意该地址路径需要包含镜像站的 Docker CE 软件源仓库路径即 `docker-ce`
- #### 指定镜像仓库地址
``` { .bash .no-copy }
bash <(curl -sSL https://linuxmirrors.cn/docker.sh) --source-registry registry.example.com
```
- #### 指定 Docker CE 软件源仓库
脚本默认会自动判断一般无需指定,除非你有特殊需求
``` { .bash .no-copy }
bash <(curl -sSL https://linuxmirrors.cn/docker.sh) --branch centos
```
> 仓库名是固定的,目前只有 `centos` `debian` `fedora` `raspbian` `rhel` `sles` `static` `ubuntu` 这几个
> 具体详见 [官方安装文档](https://docs.docker.com/engine/install) 和 [Docker CE 官方仓库](https://download.docker.com/linux)
- #### 指定 Docker CE 安装版本
指定安装版本时会忽略 `是否安装最新版本` 的命令选项,格式为 `主版本.次版本.补丁版本`,例如 `27.4.1`。
``` { .bash .no-copy }
bash <(curl -sSL https://linuxmirrors.cn/docker.sh) --designated-version 27.0.0
```
> 如果指定的版本不存在或者不支持当前系统,届时脚本会报错跳出
??? quote "查看版本列表的方法"
=== "Debian 系"
``` bash
apt-cache madison docker-ce | awk '{print $3}' | grep -Eo "[0-9][0-9].[0-9]{1,2}.[0-9]{1,2}" | sort -t '.' -k1,1nr -k2,2nr -k3,3nr
```
> `Debian` &nbsp; `Ubuntu` &nbsp; `Kali` &nbsp; `Linux Mint` &nbsp; `Deepin` &nbsp; `Zorin OS` &nbsp; `Armbian` &nbsp; `Proxmox VE` &nbsp; `Raspberry Pi OS`
=== "RedHat 系 / openEuler / OpenCloudOS / Anolis OS"
``` bash
dnf list docker-ce --showduplicates | sort -r | awk '{print $2}' | grep -Eo "[0-9][0-9].[0-9]{1,2}.[0-9]{1,2}" | sort -t '.' -k1,1nr -k2,2nr -k3,3nr
```
> `Red Hat Enterprise Linux` &nbsp; `CentOS` &nbsp; `Rocky Linux` &nbsp; `AlmaLinux` &nbsp; `Fedora` &nbsp; `openEuler` &nbsp; `OpenCloudOS` &nbsp; `Anolis OS`
未出现在该列表中的版本则不支持通过本脚本安装,如果获取不到版本列表说明你当前的系统环境还没有正确配置 Docker CE 软件源(运行脚本时不存在该问题)
- #### 无人值守(自动化)
不通过交互完成安装操作,至少需要使用如下命令选项来实现,建议熟悉后再使用
``` { .bash .no-copy title="参考命令" }
bash <(curl -sSL https://linuxmirrors.cn/docker.sh) \
--source mirror.example.com/docker-ce \
--source-registry registry.hub.docker.com \
--protocol http \
--use-intranet-source false \
--install-latest true \
--close-firewall true \
--ignore-backup-tips
```
- #### 纯净模式
为了便于开发者使用故推出此功能,启用后会精简脚本内容输出,建议搭配其它命令选项无交互使用
``` bash
bash <(curl -sSL https://linuxmirrors.cn/docker.sh) --pure-mode
```
!!! tip "滚动输出的命令日志可能存在无法预料的显示问题,不过目前暂未发现异常"
- ### 关于服务报错无法启动
!!! quote ""
非新装环境可能会在运行脚本后遇到 `Docker` 服务无法启动的情况,建议重新安装来解决,卸载不会删除镜像和容器数据
卸载命令如下:
=== "Debian 系"
``` bash
apt-get remove -y docker* containerd.io runc && apt-get autoremove
```
> `Debian` &nbsp; `Ubuntu` &nbsp; `Kali` &nbsp; `Linux Mint` &nbsp; `Deepin` &nbsp; `Zorin OS` &nbsp; `Armbian` &nbsp; `Proxmox VE` &nbsp; `Raspberry Pi OS`
=== "RedHat 系 / openEuler / OpenCloudOS / Anolis OS"
``` bash
yum remove -y docker* containerd.io podman* runc
```
> `Red Hat Enterprise Linux` &nbsp; `CentOS` &nbsp; `Rocky Linux` &nbsp; `AlmaLinux` &nbsp; `Fedora` &nbsp; `openEuler` &nbsp; `OpenCloudOS` &nbsp; `Anolis OS`
卸载完成后重新执行脚本安装即可
---
hide:
- navigation
- feedback
- footer
---
> 如果觉得这个项目不错对您有所帮助的话,请点击仓库右上角的 Star 并分享给更多的朋友 :octicons-heart-fill-24:{ .heart style="color: red" }
!!! tip inline end "本项目脚本已被众多开源项目使用,广受社区用户好评"
## :simple-docker:{style="color: #1d63ed"} Docker 安装脚本
<table>
<tr>
<td><a href="https://www.debian.org" target="_blank"><img src="/assets/images/icon/debian.svg" width="16" height="16" style="vertical-align: -0.35em"></a> Debian</td>
<td><a href="https://access.redhat.com/products/red-hat-enterprise-linux" target="_blank"><img src="/assets/images/icon/redhat.svg" width="16" height="16" style="vertical-align: -0.1em"></a> Red Hat Enterprise Linux</td>
</tr>
<tr>
<td><a href="https://cn.ubuntu.com" target="_blank"><img src="/assets/images/icon/ubuntu.svg" width="16" height="16" style="vertical-align: -0.15em"></a> Ubuntu</td>
<td><a href="https://fedoraproject.org/zh-Hans" target="_blank"><img src="/assets/images/icon/fedora.ico" width="16" height="16" style="vertical-align: -0.2em"></a> Fedora</td>
</tr>
<tr>
<td><a href="https://www.kali.org" target="_blank"><img src="/assets/images/icon/kali-linux.svg" width="16" height="16"></a> Kali Linux</td>
<td><a href="https://www.centos.org" target="_blank"><img src="/assets/images/icon/centos.svg" width="16" height="16" style="vertical-align: -0.2em"></a> CentOS</td>
</tr>
<tr>
<td><a href="https://linuxmint.com" target="_blank"><img src="/assets/images/icon/linux-mint.ico" width="16" height="16" style="vertical-align: -0.15em"></a> Linux Mint</td>
<td><a href="https://rockylinux.org" target="_blank"><img src="/assets/images/icon/rocky-linux.svg" width="16" height="16" style="vertical-align: -0.25em"></a> Rocky Linux</td>
</tr>
<tr>
<td><a href="https://www.deepin.org" target="_blank"><img src="/assets/images/icon/deepin.png" width="16" height="16" style="vertical-align: -0.3em"></a> Deepin深度</td>
<td><a href="https://almalinux.org/zh-hans" target="_blank"><img src="/assets/images/icon/almalinux.svg" width="16" height="16" style="vertical-align: -0.15em"></a> AlmaLinux</td>
</tr>
<tr>
<td><a href="https://zorin.com/os" target="_blank"><img src="/assets/images/icon/zorin-os.png" width="16" height="16" style="vertical-align: -0.3em"></a> Zorin OS</td>
<td><a href="https://www.openeuler.org/zh" target="_blank"><img src="/assets/images/icon/openeuler.ico" width="16" height="16" style="vertical-align: -0.2em"></a> openEuler开源欧拉</td>
</tr>
<tr>
<td><a href="https://www.armbian.com" target="_blank"><img src="/assets/images/icon/armbian.png" width="16" height="16" style="vertical-align: -0.2em"></a> Armbian</td>
<td><a href="https://www.opencloudos.org" target="_blank"><img src="/assets/images/icon/opencloudos.png" width="16" height="16" style="vertical-align: -0.25em"></a> OpenCloudOS鸥栖</td>
</tr>
<tr>
<td><a href="https://www.proxmox.com" target="_blank"><img src="/assets/images/icon/proxmox.svg" width="16" height="16" style="vertical-align: -0.2em"></a> Proxmox VE</td>
<td><a href="https://openanolis.cn" target="_blank"><img src="/assets/images/icon/anolis.png" width="16" height="16" style="vertical-align: -0.1em"></a> Anolis OS龙蜥</td>
</tr>
<tr>
<td><a href="https://www.raspberrypi.com" target="_blank"><img src="/assets/images/icon/raspberry-pi.png" width="16" height="16" style="vertical-align: -0.2em"></a> Raspberry Pi OS</td>
<td></td>
</tr>
</table>
!!! quote ""
=== ":linuxmirrors: 官网(推荐)"
``` bash
bash <(curl -sSL https://linuxmirrors.cn/docker.sh)
```
=== ":simple-github: GitHub"
``` bash
bash <(curl -sSL https://raw.githubusercontent.com/SuperManito/LinuxMirrors/main/DockerInstallation.sh)
```
=== ":simple-gitee: Gitee 码云"
``` bash
bash <(curl -sSL https://gitee.com/SuperManito/LinuxMirrors/raw/main/DockerInstallation.sh)
```
=== ":simple-jsdelivr: jsDelivrCDN"
``` bash
bash <(curl -sSL https://cdn.jsdelivr.net/gh/SuperManito/LinuxMirrors@main/DockerInstallation.sh)
```
集成安装 [`Docker Engine`](https://docs.docker.com/engine) 和 [`Docker Compose (插件)`](https://docs.docker.com/compose/install/linux),支持选择或更换软件源以及镜像仓库、安装指定版本、重装等功能,支持 ARM 架构处理器
脚本参考 [官方文档](https://docs.docker.com/engine/install) 采用官方提供的方法使用系统包管理工具进行安装,这意味着可安装的版本是由官方仓库决定的,本脚本不存在兼容性等问题。
> 注Docker Compose 自 V2 版本起开始作为 Docker CLI 的一部分,不再需要单独安装,请使用 `docker compose` 命令替代 `docker-compose`
!!! node "软件源说明"
`Docker CE` 软件仓库,全称 Docker Community EditionDocker 社区版),用于下载并安装 Docker 相关软件包
`Docker Registry` 镜像仓库,用于控制拉取镜像的默认来源存储仓库,又称镜像加速器,默认为官方的 Docker Hub 仓库
由于一些不可抗力的因素,目前国内网络环境一般无法正常访问 Docker Hub 因此无法拉取镜像,使用推荐的镜像源勉强能够使用不过速度可能会很慢
- ### 命令选项(高级用法)
<!-- termynal -->
```
$ bash <(curl -sSL https://linuxmirrors.cn/docker.sh) --help
命令选项(名称/含义/值)
--source 指定 Docker CE 源地址(域名或IP) 地址
--source-registry 指定镜像仓库地址(域名或IP) 地址
--branch 指定 Docker CE 源仓库(路径) 仓库名
--codename 指定 Debian 系操作系统的版本代号 代号名称
--designated-version 指定 Docker CE 安装版本 版本号
--protocol 指定 Docker CE 源的 WEB 协议 http 或 https
--install-latest 是否安装最新版本的 Docker Engine true 或 false
--close-firewall 是否关闭防火墙 true 或 false
--clean-screen 是否在运行前清除屏幕上的所有内容 true 或 false
--ignore-backup-tips 忽略覆盖备份提示 无
--pure-mode 纯净模式,精简打印内容 无
```
| 名称 | 含义 | 选项值 |
| :-: | :-: | :-: |
| `--source` | 指定 `Docker CE` 源地址(域名或IP) | `地址` |
| `--source-registry` | 指定镜像仓库地址(域名或IP) | `地址` |
| `--branch` | 指定 Docker CE 源仓库 | `仓库名(详见下方文档)` |
| `--codename` | 指定 Debian 系操作系统的版本代号 | `代号名称` |
| `--designated-version` | 指定 `Docker CE` 安装版本 | `版本号(详见下方文档)` |
| `--protocol` | 指定 `Docker CE` 源的 WEB 协议 | `http` 或 `https` |
| `--install-latest` | 是否安装最新版本的 Docker Engine | `true` 或 `false` |
| `--close-firewall` | 是否关闭防火墙 | `true``false` |
| `--clean-screen` | 是否在运行前清除屏幕上的所有内容 | `true``false` |
| `--ignore-backup-tips` | 忽略覆盖备份提示(即不覆盖备份) | 无 |
| `--pure-mode` | 纯净模式,精简打印内容 | 无 |
> 软件源完整格式 `<WEB协议>://<软件源地址(域名或IP)>/<软件源仓库(路径)>`
- #### 指定 Docker CE 软件源地址
``` { .bash .no-copy }
bash <(curl -sSL https://linuxmirrors.cn/docker.sh) --source mirror.example.com/docker-ce
```
> 注意该地址路径需要包含镜像站的 Docker CE 软件源仓库路径即 `docker-ce`
- #### 指定镜像仓库地址
``` { .bash .no-copy }
bash <(curl -sSL https://linuxmirrors.cn/docker.sh) --source-registry registry.example.com
```
- #### 指定 Docker CE 软件源仓库
脚本默认会自动判断一般无需指定,除非你有特殊需求
``` { .bash .no-copy }
bash <(curl -sSL https://linuxmirrors.cn/docker.sh) --branch centos
```
> 仓库名是固定的,目前只有 `centos` `debian` `fedora` `raspbian` `rhel` `sles` `static` `ubuntu` 这几个
> 具体详见 [官方安装文档](https://docs.docker.com/engine/install) 和 [Docker CE 官方仓库](https://download.docker.com/linux)
- #### 指定 Docker CE 安装版本
指定安装版本时会忽略 `是否安装最新版本` 的命令选项,格式为 `主版本.次版本.补丁版本`,例如 `27.4.1`。
``` { .bash .no-copy }
bash <(curl -sSL https://linuxmirrors.cn/docker.sh) --designated-version 27.0.0
```
> 如果指定的版本不存在或者不支持当前系统,届时脚本会报错跳出
??? quote "查看版本列表的方法"
=== "Debian 系"
``` bash
apt-cache madison docker-ce | awk '{print $3}' | grep -Eo "[0-9][0-9].[0-9]{1,2}.[0-9]{1,2}" | sort -t '.' -k1,1nr -k2,2nr -k3,3nr
```
> `Debian` &nbsp; `Ubuntu` &nbsp; `Kali` &nbsp; `Linux Mint` &nbsp; `Deepin` &nbsp; `Zorin OS` &nbsp; `Armbian` &nbsp; `Proxmox VE` &nbsp; `Raspberry Pi OS`
=== "RedHat 系 / openEuler / OpenCloudOS / Anolis OS"
``` bash
dnf list docker-ce --showduplicates | sort -r | awk '{print $2}' | grep -Eo "[0-9][0-9].[0-9]{1,2}.[0-9]{1,2}" | sort -t '.' -k1,1nr -k2,2nr -k3,3nr
```
> `Red Hat Enterprise Linux` &nbsp; `CentOS` &nbsp; `Rocky Linux` &nbsp; `AlmaLinux` &nbsp; `Fedora` &nbsp; `openEuler` &nbsp; `OpenCloudOS` &nbsp; `Anolis OS`
未出现在该列表中的版本则不支持通过本脚本安装,如果获取不到版本列表说明你当前的系统环境还没有正确配置 Docker CE 软件源(运行脚本时不存在该问题)
- #### 无人值守(自动化)
不通过交互完成安装操作,至少需要使用如下命令选项来实现,建议熟悉后再使用
``` { .bash .no-copy title="参考命令" }
bash <(curl -sSL https://linuxmirrors.cn/docker.sh) \
--source mirror.example.com/docker-ce \
--source-registry registry.hub.docker.com \
--protocol http \
--use-intranet-source false \
--install-latest true \
--close-firewall true \
--ignore-backup-tips
```
- #### 纯净模式
为了便于开发者使用故推出此功能,启用后会精简脚本内容输出,建议搭配其它命令选项无交互使用
``` bash
bash <(curl -sSL https://linuxmirrors.cn/docker.sh) --pure-mode
```
!!! tip "滚动输出的命令日志可能存在无法预料的显示问题,不过目前暂未发现异常"
- ### 关于服务报错无法启动
!!! quote ""
非新装环境可能会在运行脚本后遇到 `Docker` 服务无法启动的情况,建议重新安装来解决,卸载不会删除本地镜像和容器数据
卸载命令如下:
=== "Debian 系"
``` bash
apt-get remove -y docker* containerd.io runc && apt-get autoremove
```
> `Debian` &nbsp; `Ubuntu` &nbsp; `Kali` &nbsp; `Linux Mint` &nbsp; `Deepin` &nbsp; `Zorin OS` &nbsp; `Armbian` &nbsp; `Proxmox VE` &nbsp; `Raspberry Pi OS`
=== "RedHat 系 / openEuler / OpenCloudOS / Anolis OS"
``` bash
yum remove -y docker* containerd.io podman* runc
```
> `Red Hat Enterprise Linux` &nbsp; `CentOS` &nbsp; `Rocky Linux` &nbsp; `AlmaLinux` &nbsp; `Fedora` &nbsp; `openEuler` &nbsp; `OpenCloudOS` &nbsp; `Anolis OS`
卸载完成后重新执行脚本安装即可

View File

@@ -14,7 +14,7 @@ hide:
<figcaption><h3 style="font-style: normal !important"><strong>成为赞助商</strong></h3></figcaption>
<figcaption>
<button class="md-button md-button--primary" style="padding: 4px 8px 0 8px; border-radius: 5px" title="https://afdian.com/a/SuperManito" onclick="window.open('https://afdian.com/a/SuperManito')">
<img src="/assets/images/sponsor/ifdian.png" alt="1Panel" style="width: 120px" />
<img src="/assets/images/sponsor/ifdian.png" alt="1Panel" style="user-select: none; -webkit-user-select: none; width: 120px" />
</button>
</figcaption>
<figcaption><p style="color: var(--md-default-fg-color--light)">请前往作者爱发电主页查看说明并与作者取得联系</p></figcaption>

View File

@@ -17,6 +17,9 @@
<a class="sponsor-item sponsor-flex-item" target="_blank" href="https://www.sutuoyun.com" title="速拓云 - 国内高防云服务器新用户享5折优惠">
<img src="/assets/images/sponsor/sutuoyun.svg" alt="速拓云" />
</a>
<a class="sponsor-item sponsor-flex-item" target="_blank" href="https://yunyoo.cc/aff/KPTJHNWM" title="云悠YUNYOO - 全球高性价比云服务器低至15.99元起">
<img src="/assets/images/sponsor/yunyoo.png" alt="云悠YUNYOO" />
</a>
<a class="sponsor-item sponsor-flex-item" target="_blank" href="https://arcadia.cool" title="一站式代码运维平台">
<img src="/assets/images/sponsor/arcadia-light.png#only-light" alt="Arcadia" />
<img src="/assets/images/sponsor/arcadia-dark.png#only-dark" alt="Arcadia" />

View File

@@ -28,6 +28,9 @@
<a class="sponsor-item sponsor-item-toc" target="_blank" href="https://www.sutuoyun.com" title="速拓云 - 国内高防云服务器新用户享5折优惠">
<img src="/assets/images/sponsor/sutuoyun.svg" alt="速拓云" />
</a>
<a class="sponsor-item sponsor-item-toc" target="_blank" href="https://yunyoo.cc/aff/KPTJHNWM" title="云悠YUNYOO - 全球高性价比云服务器低至15.99元起">
<img src="/assets/images/sponsor/yunyoo.png" alt="云悠YUNYOO" />
</a>
<a class="sponsor-item sponsor-item-toc" target="_blank" href="https://arcadia.cool" title="一站式代码运维平台">
<img src="/assets/images/sponsor/arcadia-light.png#only-light" alt="Arcadia" style="margin: 0 6px" />
<img src="/assets/images/sponsor/arcadia-dark.png#only-dark" alt="Arcadia" style="margin: 0 6px" />

View File

@@ -387,6 +387,41 @@ hide:
## 命令选项(高级用法)
<!-- termynal -->
```
$ bash <(curl -sSL https://linuxmirrors.cn/main.sh) --help
命令选项(名称/含义/值)
--abroad 使用境外以及海外软件源 无
--edu 使用中国大陆教育网软件源 无
--source 指定软件源地址(域名或IP) 地址
--source-epel 指定 EPEL 附加软件包仓库的软件源地址(域名或IP) 地址
--source-security 指定 Debian 系统 security 仓库的软件源地址(域名或IP) 地址
--source-vault 指定 CentOS / AlmaLinux 系统 vault 仓库的软件源地址(域名或IP) 地址
--source-portage 指定 Gentoo 系统 portage 仓库的软件源地址(域名或IP) 地址
--source-base-system 指定 Linux Mint / Raspberry Pi OS 底层系统的软件源地址(域名或IP) 地址
--branch 指定软件源仓库(路径) 仓库名
--branch-epel 指定 EPEL 附加软件包仓库的软件源仓库(路径) 仓库名
--branch-security 指定 Debian 系统 security 仓库的软件源仓库(路径) 仓库名
--branch-vault 指定 CentOS / AlmaLinux 系统 vault 仓库的软件源仓库(路径) 仓库名
--branch-portage 指定 Gentoo 系统 portage 仓库的软件源仓库(路径) 仓库名
--branch-base-system 指定 Linux Mint / Raspberry Pi OS 底层系统的软件源仓库(路径) 仓库名
--codename 指定 Debian 系 / openKylin 操作系统的版本代号 代号名称
--protocol 指定 WEB 协议 http 或 https
--use-intranet-source 是否优先使用内网软件源地址 true 或 false
--use-official-source 是否使用目标操作系统的官方软件源 true 或 false
--install-epel 是否安装 EPEL 附加软件包 true 或 false
--backup 是否备份原有软件源 true 或 false
--upgrade-software 是否更新软件包 true 或 false
--clean-cache 是否在更新软件包后清理下载缓存 true 或 false
--clean-screen 是否在运行前清除屏幕上的所有内容 true 或 false
--only-epel 仅更换 EPEL 软件源模式 无
--ignore-backup-tips 忽略覆盖备份提示 无
--print-diff 打印源文件修改前后差异 无
--pure-mode 纯净模式,精简打印内容 无
```
| 名称 | 含义 | 选项值 |
| - | - | :-: |
| `--abroad` | 使用境外以及海外软件源 | 无 |
@@ -420,43 +455,6 @@ hide:
> 软件源完整格式 `<WEB协议>://<软件源地址(域名或IP)>/<软件源仓库(路径)>`
<!-- termynal -->
```
$ bash ChangeMirrors.sh --help
命令选项(名称/含义/值)
--abroad 使用境外以及海外软件源 无
--edu 使用中国大陆教育网软件源 无
--source 指定软件源地址(域名或IP) 地址
--source-epel 指定 EPEL 附加软件包仓库的软件源地址(域名或IP) 地址
--source-security 指定 Debian 系统 security 仓库的软件源地址(域名或IP) 地址
--source-vault 指定 CentOS / AlmaLinux 系统 vault 仓库的软件源地址(域名或IP) 地址
--source-portage 指定 Gentoo 系统 portage 仓库的软件源地址(域名或IP) 地址
--source-base-system 指定 Linux Mint / Raspberry Pi OS 底层系统的软件源地址(域名或IP) 地址
--branch 指定软件源仓库(路径) 仓库名
--branch-epel 指定 EPEL 附加软件包仓库的软件源仓库(路径) 仓库名
--branch-security 指定 Debian 系统 security 仓库的软件源仓库(路径) 仓库名
--branch-vault 指定 CentOS / AlmaLinux 系统 vault 仓库的软件源仓库(路径) 仓库名
--branch-portage 指定 Gentoo 系统 portage 仓库的软件源仓库(路径) 仓库名
--branch-base-system 指定 Linux Mint / Raspberry Pi OS 底层系统的软件源仓库(路径) 仓库名
--codename 指定 Debian 系 / openKylin 操作系统的版本代号 代号名称
--protocol 指定 WEB 协议 http 或 https
--use-intranet-source 是否优先使用内网软件源地址 true 或 false
--use-official-source 是否使用目标操作系统的官方软件源 true 或 false
--install-epel 是否安装 EPEL 附加软件包 true 或 false
--backup 是否备份原有软件源 true 或 false
--upgrade-software 是否更新软件包 true 或 false
--clean-cache 是否在更新软件包后清理下载缓存 true 或 false
--clean-screen 是否在运行前清除屏幕上的所有内容 true 或 false
--only-epel 仅更换 EPEL 软件源模式 无
--ignore-backup-tips 忽略覆盖备份提示 无
--print-diff 打印源文件修改前后差异 无
--pure-mode 纯净模式,精简打印内容 无
问题报告 https://github.com/SuperManito/LinuxMirrors/issues
```
下面是一些高级用法的举例
- ### 指定软件源地址