mirror of
https://gitee.com/SuperManito/LinuxMirrors
synced 2025-11-03 16:00:26 +08:00
优化 Docker 脚本 & 更新文档
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
## Author: SuperManito
|
||||
## Modified: 2023-05-09
|
||||
## Modified: 2023-05-10
|
||||
## License: MIT
|
||||
## Github: https://github.com/SuperManito/LinuxMirrors
|
||||
## Website: https://linuxmirrors.cn
|
||||
@@ -307,7 +307,7 @@ function EnvJudgment() {
|
||||
SYSTEM_JUDGMENT="${SYSTEM_OPENCLOUDOS}"
|
||||
;;
|
||||
"${SYSTEM_OPENEULER}")
|
||||
SYSTEM_JUDGMENT="$(cat $File_openEulerRelease | awk -F ' ' '{printf$1}')"
|
||||
SYSTEM_JUDGMENT="${SYSTEM_OPENEULER}"
|
||||
;;
|
||||
"${SYSTEM_OPENSUSE}")
|
||||
SYSTEM_JUDGMENT="${SYSTEM_OPENSUSE}"
|
||||
@@ -5083,7 +5083,7 @@ function CommandOptions() {
|
||||
esac
|
||||
shift
|
||||
done
|
||||
## 赋予部分命令参数默认值
|
||||
## 给部分命令选项赋予默认值
|
||||
ONLY_EPEL="${ONLY_EPEL:-"false"}"
|
||||
BACKUP="${BACKUP:-"true"}"
|
||||
IGNORE_BACKUP_TIPS="${IGNORE_BACKUP_TIPS:-"false"}"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -10,25 +10,25 @@ hide:
|
||||
|
||||
| | 镜像站名称 | IPv6 | Kali | Rocky | AlmaLinux | EPEL | Fedora | openEuler | OpenCloudOS |
|
||||
| :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: |
|
||||
| 1 | [阿里云](https://mirrors.aliyun.com) | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-circle-off-outline:{style="color: #F6B604"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-close:{style="color: #EF5350"} |
|
||||
| 2 | [腾讯云](https://mirrors.tencent.com) | :material-close:{style="color: #EF5350"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} |
|
||||
| 3 | [华为云](https://mirrors.huaweicloud.com) | :material-close:{style="color: #EF5350"} | :material-check:{style="color: #4DB6AC"} | :material-circle-off-outline:{style="color: #F6B604"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-close:{style="color: #EF5350"} |
|
||||
| 4 | [网易](https://mirrors.163.com) | :material-close:{style="color: #EF5350"} | :material-close:{style="color: #EF5350"} | :material-check:{style="color: #4DB6AC"} | :material-close:{style="color: #EF5350"} | :material-close:{style="color: #EF5350"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-close:{style="color: #EF5350"} |
|
||||
| 5 | [搜狐](https://mirrors.sohu.com) | :material-close:{style="color: #EF5350"} | :material-close:{style="color: #EF5350"} | :material-circle-off-outline:{style="color: #F6B604"} | :material-close:{style="color: #EF5350"} | :material-close:{style="color: #EF5350"} | :material-check:{style="color: #4DB6AC"} | :material-close:{style="color: #EF5350"} | :material-close:{style="color: #EF5350"} |
|
||||
| 6 | [清华大学](https://mirrors.tuna.tsinghua.edu.cn) | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-close:{style="color: #EF5350"} | :material-close:{style="color: #EF5350"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-close:{style="color: #EF5350"} |
|
||||
| 7 | [北京大学](https://mirrors.pku.edu.cn/Mirrors) | :material-check:{style="color: #4DB6AC"} | :material-close:{style="color: #EF5350"} | :material-close:{style="color: #EF5350"} | :material-close:{style="color: #EF5350"} | :material-check:{style="color: #4DB6AC"} | :material-close:{style="color: #EF5350"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} |
|
||||
| 8 | [浙江大学](https://mirrors.zju.edu.cn) | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-close:{style="color: #EF5350"} |
|
||||
| 9 | [南京大学](https://mirrors.nju.edu.cn) | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-close:{style="color: #EF5350"} |
|
||||
| 10 | [重庆大学](https://mirrors.cqu.edu.cn) | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-circle-off-outline:{style="color: #F6B604"} | :material-close:{style="color: #EF5350"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-close:{style="color: #EF5350"} | :material-close:{style="color: #EF5350"} |
|
||||
| 11 | [兰州大学](https://mirror.lzu.edu.cn) | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-close:{style="color: #EF5350"} |
|
||||
| 12 | [上海交通大学](https://mirror.sjtu.edu.cn) | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} |
|
||||
| 13 | [哈尔滨工业大学](https://mirrors.hit.edu.cn) | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-close:{style="color: #EF5350"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-close:{style="color: #EF5350"} |
|
||||
| 14 | [中国科学技术大学](https://mirrors.ustc.edu.cn) | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-close:{style="color: #EF5350"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-close:{style="color: #EF5350"} |
|
||||
| 15 | [中国科学院软件研究所](https://mirror.iscas.ac.cn) | :material-close:{style="color: #EF5350"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-check:{style="color: #4DB6AC"} | :material-close:{style="color: #EF5350"} |
|
||||
| 1 | [阿里云](https://mirrors.aliyun.com) | :material-check:{style="color:#4DB6AC"} | :material-check:{style="color:#4DB6AC"} | :material-circle-off-outline:{style="color:#F6B604"} | :material-check:{style="color:#4DB6AC"} | :material-check:{style="color:#4DB6AC"} | :material-check:{style="color:#4DB6AC"} | :material-check:{style="color:#4DB6AC"} | :material-close:{style="color:#EF5350"} |
|
||||
| 2 | [腾讯云](https://mirrors.tencent.com) | :material-close:{style="color:#EF5350"} | :material-check:{style="color:#4DB6AC"} | :material-check:{style="color:#4DB6AC"} | :material-check:{style="color:#4DB6AC"} | :material-check:{style="color:#4DB6AC"} | :material-check:{style="color:#4DB6AC"} | :material-check:{style="color:#4DB6AC"} | :material-check:{style="color:#4DB6AC"} |
|
||||
| 3 | [华为云](https://mirrors.huaweicloud.com) | :material-close:{style="color:#EF5350"} | :material-check:{style="color:#4DB6AC"} | :material-circle-off-outline:{style="color:#F6B604"} | :material-check:{style="color:#4DB6AC"} | :material-check:{style="color:#4DB6AC"} | :material-check:{style="color:#4DB6AC"} | :material-check:{style="color:#4DB6AC"} | :material-close:{style="color:#EF5350"} |
|
||||
| 4 | [网易](https://mirrors.163.com) | :material-close:{style="color:#EF5350"} | :material-close:{style="color:#EF5350"} | :material-check:{style="color:#4DB6AC"} | :material-close:{style="color:#EF5350"} | :material-close:{style="color:#EF5350"} | :material-check:{style="color:#4DB6AC"} | :material-check:{style="color:#4DB6AC"} | :material-close:{style="color:#EF5350"} |
|
||||
| 5 | [搜狐](https://mirrors.sohu.com) | :material-close:{style="color:#EF5350"} | :material-close:{style="color:#EF5350"} | :material-circle-off-outline:{style="color:#F6B604"} | :material-close:{style="color:#EF5350"} | :material-close:{style="color:#EF5350"} | :material-check:{style="color:#4DB6AC"} | :material-close:{style="color:#EF5350"} | :material-close:{style="color:#EF5350"} |
|
||||
| 6 | [清华大学](https://mirrors.tuna.tsinghua.edu.cn) | :material-check:{style="color:#4DB6AC"} | :material-check:{style="color:#4DB6AC"} | :material-close:{style="color:#EF5350"} | :material-close:{style="color:#EF5350"} | :material-check:{style="color:#4DB6AC"} | :material-check:{style="color:#4DB6AC"} | :material-check:{style="color:#4DB6AC"} | :material-close:{style="color:#EF5350"} |
|
||||
| 7 | [北京大学](https://mirrors.pku.edu.cn/Mirrors) | :material-check:{style="color:#4DB6AC"} | :material-close:{style="color:#EF5350"} | :material-close:{style="color:#EF5350"} | :material-close:{style="color:#EF5350"} | :material-check:{style="color:#4DB6AC"} | :material-close:{style="color:#EF5350"} | :material-check:{style="color:#4DB6AC"} | :material-check:{style="color:#4DB6AC"} |
|
||||
| 8 | [浙江大学](https://mirrors.zju.edu.cn) | :material-check:{style="color:#4DB6AC"} | :material-check:{style="color:#4DB6AC"} | :material-check:{style="color:#4DB6AC"} | :material-check:{style="color:#4DB6AC"} | :material-check:{style="color:#4DB6AC"} | :material-check:{style="color:#4DB6AC"} | :material-check:{style="color:#4DB6AC"} | :material-close:{style="color:#EF5350"} |
|
||||
| 9 | [南京大学](https://mirrors.nju.edu.cn) | :material-check:{style="color:#4DB6AC"} | :material-check:{style="color:#4DB6AC"} | :material-check:{style="color:#4DB6AC"} | :material-check:{style="color:#4DB6AC"} | :material-check:{style="color:#4DB6AC"} | :material-check:{style="color:#4DB6AC"} | :material-check:{style="color:#4DB6AC"} | :material-close:{style="color:#EF5350"} |
|
||||
| 10 | [重庆大学](https://mirrors.cqu.edu.cn) | :material-check:{style="color:#4DB6AC"} | :material-check:{style="color:#4DB6AC"} | :material-circle-off-outline:{style="color:#F6B604"} | :material-close:{style="color:#EF5350"} | :material-check:{style="color:#4DB6AC"} | :material-check:{style="color:#4DB6AC"} | :material-close:{style="color:#EF5350"} | :material-close:{style="color:#EF5350"} |
|
||||
| 11 | [兰州大学](https://mirror.lzu.edu.cn) | :material-check:{style="color:#4DB6AC"} | :material-check:{style="color:#4DB6AC"} | :material-check:{style="color:#4DB6AC"} | :material-check:{style="color:#4DB6AC"} | :material-check:{style="color:#4DB6AC"} | :material-check:{style="color:#4DB6AC"} | :material-check:{style="color:#4DB6AC"} | :material-close:{style="color:#EF5350"} |
|
||||
| 12 | [上海交通大学](https://mirror.sjtu.edu.cn) | :material-check:{style="color:#4DB6AC"} | :material-check:{style="color:#4DB6AC"} | :material-check:{style="color:#4DB6AC"} | :material-check:{style="color:#4DB6AC"} | :material-check:{style="color:#4DB6AC"} | :material-check:{style="color:#4DB6AC"} | :material-check:{style="color:#4DB6AC"} | :material-check:{style="color:#4DB6AC"} |
|
||||
| 13 | [哈尔滨工业大学](https://mirrors.hit.edu.cn) | :material-check:{style="color:#4DB6AC"} | :material-check:{style="color:#4DB6AC"} | :material-close:{style="color:#EF5350"} | :material-check:{style="color:#4DB6AC"} | :material-check:{style="color:#4DB6AC"} | :material-check:{style="color:#4DB6AC"} | :material-check:{style="color:#4DB6AC"} | :material-close:{style="color:#EF5350"} |
|
||||
| 14 | [中国科学技术大学](https://mirrors.ustc.edu.cn) | :material-check:{style="color:#4DB6AC"} | :material-check:{style="color:#4DB6AC"} | :material-check:{style="color:#4DB6AC"} | :material-close:{style="color:#EF5350"} | :material-check:{style="color:#4DB6AC"} | :material-check:{style="color:#4DB6AC"} | :material-check:{style="color:#4DB6AC"} | :material-close:{style="color:#EF5350"} |
|
||||
| 15 | [中国科学院软件研究所](https://mirror.iscas.ac.cn) | :material-close:{style="color:#EF5350"} | :material-check:{style="color:#4DB6AC"} | :material-check:{style="color:#4DB6AC"} | :material-check:{style="color:#4DB6AC"} | :material-check:{style="color:#4DB6AC"} | :material-check:{style="color:#4DB6AC"} | :material-check:{style="color:#4DB6AC"} | :material-close:{style="color:#EF5350"} |
|
||||
|
||||
???+ question "使用帮助"
|
||||
|
||||
:material-check:{style="color: #4DB6AC"} 支持 :material-close:{style="color: #EF5350"} 不支持 :material-circle-off-outline:{style="color: #F6B604"} 表示软件源分支命名不符合脚本默认规则,但可以通过命令参数来使用,关于具体用法示例和各操作系统所使用的默认分支名称[详见此处](../use/command-options/#%E6%8C%87%E5%AE%9A%E8%BD%AF%E4%BB%B6%E6%BA%90%E5%88%86%E6%94%AF)
|
||||
:material-check:{style="color:#4DB6AC"} 支持 :material-close:{style="color:#EF5350"} 不支持 :material-circle-off-outline:{style="color:#F6B604"} 不兼容,表示软件源分支命名不符合脚本默认规则但可以通过命令参数来使用,关于具体用法示例和各操作系统所使用的默认分支名称[详见此处](../use/command-options/#%E6%8C%87%E5%AE%9A%E8%BD%AF%E4%BB%B6%E6%BA%90%E5%88%86%E6%94%AF)
|
||||
|
||||
上述列表中的镜像站均支持 `Debian` `Ubuntu` `CentOS` `openSUSE` `Arch Linux` 软件源,列表根据单位性质、地理位置、名称长度进行排序与实际速度无关,目前没有扩充计划
|
||||
|
||||
|
||||
@@ -1,24 +1,56 @@
|
||||
---
|
||||
hide:
|
||||
- navigation
|
||||
- toc
|
||||
- feedback
|
||||
- footer
|
||||
---
|
||||
|
||||
## :fontawesome-brands-docker: Docker 一键安装脚本
|
||||
## :fontawesome-brands-docker:{style="color: #086dd7"} 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.45em"/></a> Debian</td>
|
||||
<td><a href="https://www.centos.org/centos-linux" target="_blank"><img src="/../assets/images/icon/centos.svg" width="16" height="16" style="vertical-align: -0.15em"/></a> CentOS</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://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.kali.org" target="_blank"><img src="/../assets/images/icon/kali-linux.svg" width="16" height="16"/></a> Kali Linux</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.25em"/></a> AlmaLinux</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<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.15em"/></a> Red Hat Enterprise Linux</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://fedoraproject.org/zh-Hans" target="_blank"><img src="/../assets/images/icon/fedora.ico" width="16" height="16" style="vertical-align: -0.15em"/></a> Fedora</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.25em"/></a> openEuler</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
``` bash
|
||||
bash <(curl -sSL https://linuxmirrors.cn/docker.sh)
|
||||
```
|
||||
|
||||
!!! node ""
|
||||
`Docker CE` 软件镜像仓库,全称 Docker Community Edition ,用于下载并安装 Docker 相关软件包。
|
||||
`Docker Hub` 容器镜像仓库,默认为官方提供的公共库,用于控制下载镜像的来源存储仓库,又称镜像加速器。
|
||||
|
||||
脚本集成安装 `Docker Engine`,可手动选择安装版本、下载源、镜像加速器,支持海内外服务器环境和 `arm` 架构处理器环境使用
|
||||
脚本集成安装 [`Docker Engine`](https://docs.docker.com/engine),可手动选择安装版本、下载软件源、镜像加速器,支持海内外服务器环境和 `arm` 架构处理器环境使用
|
||||
|
||||
??? quote "原始方法"
|
||||
`Docker CE` 软件镜像仓库,全称 Docker Community Edition ,用于下载并安装 Docker 相关软件包
|
||||
`Docker Hub` 容器镜像仓库,默认为官方提供的公共库,用于控制下载镜像的来源存储仓库,又称镜像加速器
|
||||
|
||||
### 命令选项
|
||||
|
||||
| 名称 | 含义 | 选项值 |
|
||||
| :-: | :-: | :-: |
|
||||
| `--source` | 指定 `Docker CE` 源地址 | 地址 |
|
||||
| `--source-registry` | 指定 Docker Hub 源地址 | 地址 |
|
||||
| `--install-latested` | 控制是否安装最新版本的 Docker Engine | 地址 |
|
||||
| `--ignore-backup-tips` | 忽略覆盖备份提示(即不覆盖备份) | 无 |
|
||||
|
||||
??? quote "原始执行脚本方法"
|
||||
|
||||
``` bash
|
||||
bash <(curl -sSL https://gitee.com/SuperManito/LinuxMirrors/raw/main/DockerInstallation.sh)
|
||||
|
||||
@@ -37,7 +37,7 @@ bash <(curl -sSL https://linuxmirrors.cn/main.sh) --edu # (1)!
|
||||
|
||||
:material-numeric-1:{style="color: #3CA7E5"} 需使用 `Root` 用户执行脚本
|
||||
|
||||
: 切换命令为 `su root`
|
||||
: 切换命令为 `sudo -i` 或 `su root`,不同系统环境使用的命令不一样,因为有些系统没有在初始安装时为 Root 用户设置固定密码所以需要使用 `sudo` 指令来提权
|
||||
|
||||
:material-numeric-2:{style="color: #3CA7E5"} 建议使用 `SSH` 远程工具
|
||||
|
||||
|
||||
@@ -52,7 +52,6 @@ theme:
|
||||
- content.tooltips
|
||||
- content.code.copy
|
||||
- content.code.annotate
|
||||
- content.tabs.link
|
||||
- search.suggest
|
||||
- search.highlight
|
||||
- announce.dismiss
|
||||
|
||||
Reference in New Issue
Block a user