mirror of
https://gitee.com/SuperManito/LinuxMirrors
synced 2025-12-30 19:46:34 +08:00
优化
This commit is contained in:
@@ -7,7 +7,6 @@ function install_docker() {
|
||||
|
||||
# script options
|
||||
local script_host="linuxmirrors.cn" # official host (CDN), more host see official site
|
||||
local script_lang="zh-hans" # script display language: zh-hans / zh-hant / en / auto
|
||||
local close_firewall="true" # close firewalld service and selinux (redhat systems need)
|
||||
# mirrors options
|
||||
local source_docker_ce_address="mirrors.tencent.com/docker-ce" # global high availability address
|
||||
@@ -52,15 +51,11 @@ function install_docker() {
|
||||
fi
|
||||
|
||||
# install docker engine
|
||||
bash <(curl -sSL https://${script_host}/docker.sh) \
|
||||
bash <(curl -sSL https://${script_host}/docker-lite.sh) \
|
||||
--source "${source_docker_ce_address}" \
|
||||
--source-registry "${source_docker_registry_address}" \
|
||||
--protocol "${source_docker_ce_protocol}" \
|
||||
--close-firewall "${close_firewall}" \
|
||||
--install-latest true \
|
||||
--ignore-backup-tips \
|
||||
--lang "${script_lang}" \
|
||||
--pure-mode
|
||||
--close-firewall "${close_firewall}"
|
||||
}
|
||||
|
||||
install_docker
|
||||
|
||||
@@ -471,6 +471,20 @@ Command options(name/meaning/value):
|
||||
|
||||
You can also use [{ width="140" style="vertical-align: -0.2rem" }](https://www.docker.com/products/docker-desktop)
|
||||
|
||||
## Lite Version
|
||||
|
||||
The project also provides a simplified version, which is a copy of the main script, designed for enterprise products and large open-source community projects. It has the following features:
|
||||
|
||||
- Single display language `English`, no I18n internationalization
|
||||
- Uses the official source by default, removing the interactive selection of built-in software sources
|
||||
- Removes irrelevant printouts
|
||||
- Retains core logic and command option design
|
||||
|
||||
``` bash
|
||||
bash <(curl -sSL https://linuxmirrors.cn/docker-lite.sh)
|
||||
```
|
||||
> Please familiarize yourself with this project before using it. It is not recommended for novice users.
|
||||
|
||||
## Best Practices
|
||||
|
||||
??? note "Code examples for enterprise product deployment and automated operations such as CI/CD (expand to view)"
|
||||
|
||||
@@ -471,6 +471,20 @@ $ bash <(curl -sSL https://linuxmirrors.cn/docker.sh) --help
|
||||
|
||||
也可以使用 [{ width="140" style="vertical-align: -0.2rem" }](https://www.docker.com/products/docker-desktop)
|
||||
|
||||
## 精简版(Lite)
|
||||
|
||||
项目额外提供一个精简版本,是主脚本的复制,面向企业产品、大型开源社区项目使用,具有以下特性:
|
||||
|
||||
- 单一显示语言 `English`,无 I18n 国际化功能
|
||||
- 默认使用官方源,去除了交互选择内置软件源功能
|
||||
- 去除了无关的打印内容
|
||||
- 保留核心逻辑与命令选项设计
|
||||
|
||||
``` bash
|
||||
bash <(curl -sSL https://linuxmirrors.cn/docker-lite.sh)
|
||||
```
|
||||
> 请熟悉本项目后再使用,不建议新手用户使用
|
||||
|
||||
## 最佳实践
|
||||
|
||||
??? note "适用于企业产品部署以及 CI/CD 等自动化运维场景的代码示例(展开查看)"
|
||||
|
||||
@@ -471,6 +471,20 @@ $ bash <(curl -sSL https://linuxmirrors.cn/docker.sh) --zh-hant --help
|
||||
|
||||
也可以使用 [{ width="140" style="vertical-align: -0.2rem" }](https://www.docker.com/products/docker-desktop)
|
||||
|
||||
## 精簡版(Lite)
|
||||
|
||||
專案額外提供一個精簡版本,是主腳本的複製,面向企業產品、大型開源社群專案使用,具有以下特性:
|
||||
|
||||
- 單一顯示語言 `English`,無 I18n 國際化功能
|
||||
- 預設使用官方來源,去除了互動選擇內建軟體源功能
|
||||
- 去除了無關的列印內容
|
||||
- 保留核心邏輯與指令選項設計
|
||||
|
||||
``` bash
|
||||
bash <(curl -sSL https://linuxmirrors.cn/docker-lite.sh)
|
||||
```
|
||||
> 請熟悉本項目後再使用,不建議新手使用者使用
|
||||
|
||||
- ## 最佳實踐
|
||||
|
||||
??? note "適用於企業產品部署以及 CI/CD 等自動化維運場景的程式碼範例(展開檢視)"
|
||||
|
||||
Reference in New Issue
Block a user