更新文档

This commit is contained in:
Super Manito
2025-09-30 10:40:23 +08:00
parent 3b19a24576
commit 55b22bf72b
9 changed files with 130 additions and 15 deletions

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 11 KiB

View File

@@ -22,7 +22,7 @@ hide:
<figcaption>One-Click Script Makes Mirror Switching Easier</figcaption>
</figure>
<figure class="home-cmd no-select" style="margin: 0; display: flex; flex-direction: column; justify-content: center" markdown>
=== ":material-linux:{ .lg .middle } GNU/Linux"
=== ":linux:{ .middle } GNU/Linux"
<img src="/assets/images/brand/command/linux-light.png#only-light" alt="command-linux" />
<img src="/assets/images/brand/command/linux-dark.png#only-dark" alt="command-linux" />

View File

@@ -22,7 +22,7 @@ hide:
<figcaption>一键脚本使换源更简单</figcaption>
</figure>
<figure class="home-cmd no-select" style="margin: 0; display: flex; flex-direction: column; justify-content: center" markdown>
=== ":material-linux:{ .lg .middle } GNU/Linux"
=== ":linux:{ .middle } GNU/Linux"
<img src="/assets/images/brand/command/linux-light.png#only-light" alt="command-linux" />
<img src="/assets/images/brand/command/linux-dark.png#only-dark" alt="command-linux" />

View File

@@ -22,7 +22,7 @@ hide:
<figcaption>一鍵腳本讓換源更簡單</figcaption>
</figure>
<figure class="home-cmd no-select" style="margin: 0; display: flex; flex-direction: column; justify-content: center" markdown>
=== ":material-linux:{ .lg .middle } GNU/Linux"
=== ":linux:{ .middle } GNU/Linux"
<img src="/assets/images/brand/command/linux-light.png#only-light" alt="command-linux" />
<img src="/assets/images/brand/command/linux-dark.png#only-dark" alt="command-linux" />

57
docs/other/example.md Normal file
View File

@@ -0,0 +1,57 @@
``` bash
# !/bin/bash
function install_docker() {
local region_code="$(curl -s ipinfo.io/country)"
local close_firewall="true" # close firewalld service and selinux (redhat systems need)
local source_docker_ce_address="mirrors.tencent.com/docker-ce" # global high availability address
local source_docker_ce_protocol="https"
local source_docker_registry_address=""
# judge network environment
if [[ "${region_code}" == "CN" ]]; then
local source_intranet_address=""
# use intranet source if possible
if [ -s "/sys/class/dmi/id/sys_vendor" ]; then
local sys_vendor="$(cat /sys/class/dmi/id/sys_vendor)"
if [[ "${sys_vendor}" == *"Alibaba"* ]]; then
source_intranet_address="mirrors.cloud.aliyuncs.com/docker-ce"
elif [[ "${sys_vendor}" == *"Huawei"* ]]; then
source_intranet_address="mirrors.myhuaweicloud.com/docker-ce"
elif [[ "${sys_vendor}" == *"Tencent"* ]]; then
source_intranet_address="mirrors.tencentyun.com/docker-ce"
elif [[ "${sys_vendor}" == *"Inspur"* ]]; then
source_intranet_address="mirrors.ivolces.com/docker-ce"
fi
else
cat /etc/motd | grep "Alibaba Cloud " -q
if [ $? -eq 0 ]; then
source_intranet_address="mirrors.cloud.aliyuncs.com/docker-ce"
fi
fi
# check connectivity
if [ -n "${source_intranet_address}" ]; then
if ping -c1 -W1 "${source_intranet_address%%/*}" >/dev/null 2>&1; then
source_docker_ce_address="${source_intranet_address}"
source_docker_ce_protocol="http"
fi
fi
source_docker_registry_address="docker.1ms.run"
else
source_docker_ce_address="download.docker.com"
source_docker_registry_address="registry.hub.docker.com"
fi
# run
bash <(curl -sSL https://linuxmirrors.cn/docker.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 \
--pure-mode
}
install_docker
```

View File

@@ -104,22 +104,34 @@ hide:
<div class="grid cards" markdown>
- :material-star-four-points-outline:{ .lg .middle } __Can completely replace the official installation script__
- :material-shimmer:{ .lg .middle } __Completely replace the official installation script__
---
It is logically consistent with [get.docker.com](https://get.docker.com) and incorporates the repositories and features of this project.
- :material-arm-flex-outline:{ .lg .middle } __Supports domestic derivative operating systems__
- :material-graph:{ .lg .middle } __Supports domestic derivative operating systems__
---
Compatible with a number of derivative operating systems not supported by the official installation script. :material-information-outline:{ title="In addition to the systems displayed on the official website, it also supports special systems such as <code>Huawei Cloud EulerOS</code>&nbsp;&nbsp;<code>TencentOS Server</code>&nbsp;&nbsp;<code>Alibaba Cloud Linux</code>" }
- :material-weight-lifter:{ .lg .middle } __Powerful and unparalleled__
---
One of the most practical open source operation and maintenance scripts on the entire network, with excellent performance
- :material-compass-rose:{ .lg .middle } __Exquisite interactive design__
---
An interactive command line interface that is easy to understand and use, way ahead of the competition
</div>
<div style="display: flex; align-items: center; gap: 8px;">
<p>After years of technical accumulation and production environment testing, it has been widely praised by the community and deeply loved by developers. It is used by major companies.</p>
<p>After years of technical accumulation and production environment testing, it has been widely praised by the community and deeply loved by developers. It is used by major companies.</p>
<div class="icon-brand-section">
<div class="icon-brand-container no-select">
<a class="icon-brand-button" target="_blank" href="https://1panel.pro" title="1Panel">
@@ -392,3 +404,10 @@ hide:
If it prompts that it is not supported, please use the system's own package management tool to install it. Because these packages are built and maintained by the Linux distribution's package maintainers and may have differences in configuration or are built from modified source code.
You can also use [Docker Desktop](https://www.docker.com/products/docker-desktop)
- ### Best Practices
<details>
<summary>Code examples for enterprise product deployment and automated operations such as CI/CD (expand to view)</summary>
--8<-- "docs/other/example.md"
</details>

View File

@@ -98,22 +98,34 @@ hide:
<div class="grid cards" markdown>
- :material-star-four-points-outline:{ .lg .middle } __完全替代官方安装脚本__
- :material-shimmer:{ .lg .middle } __完全替代官方安装脚本__
---
与 [get.docker.com](https://get.docker.com) 逻辑一致,融合了本项目换源架构以及特性
- :material-arm-flex-outline:{ .lg .middle } __支持国产衍生操作系统__
- :material-graph:{ .lg .middle } __支持国产衍生操作系统__
---
兼容大量不受官方安装脚本支持的衍生操作系统 :material-information-outline:{ title="除官网首页展示的系统外还支持 <code>Huawei Cloud EulerOS</code>&nbsp;&nbsp;<code>TencentOS Server</code>&nbsp;&nbsp;<code>Alibaba Cloud Linux</code> 等特制系统" }
- :material-weight-lifter:{ .lg .middle } __功能强大、无以伦比__
---
全网最实用的开源运维脚本之一,性能卓越
- :material-compass-rose:{ .lg .middle } __精妙绝伦的交互设计__
---
易于理解和使用的交互式命令行界面,遥遥领先
</div>
<div style="display: flex; align-items: center; gap: 8px;">
<p>经过了数年的技术沉淀与生产环境检验,广受社区好评,深得开发者喜爱,大厂都在使用</p>
<p>经过了数年的技术沉淀与生产环境检验,广受社区好评,深得开发者喜爱,大厂都在使用</p>
<div class="icon-brand-section">
<div class="icon-brand-container no-select">
<a class="icon-brand-button" target="_blank" href="https://1panel.cn" title="1Panel">
@@ -408,3 +420,10 @@ hide:
如果提示不支持那么请使用系统自带的包管理工具进行安装。因为这些软件包由 Linux 发行版的软件包维护者构建和维护,可能存在配置差异或由修改后的源代码构建。
也可以使用 [Docker Desktop](https://www.docker.com/products/docker-desktop)
- ### 最佳实践
<details>
<summary>适用于企业产品部署以及 CI/CD 等自动化运维场景的代码示例(展开查看)</summary>
--8<-- "docs/other/example.md"
</details>

View File

@@ -104,22 +104,34 @@ hide:
<div class="grid cards" markdown>
- :material-star-four-points-outline:{ .lg .middle } __完全取代官方安裝腳本__
- :material-shimmer:{ .lg .middle } __完全取代官方安裝腳本__
---
與 [get.docker.com](https://get.docker.com) 邏輯一致,融合了本項目換源架構以及特性
- :material-arm-flex-outline:{ .lg .middle } __支援衍生作業系統__
- :material-graph:{ .lg .middle } __支援衍生作業系統__
---
相容於大量不受官方安裝腳本支援的衍生作業系統 :material-information-outline:{ title="除官網首頁展示的系統外也支援 <code>Huawei Cloud EulerOS</code>&nbsp;&nbsp;<code>TencentOS Server</code>&nbsp;&nbsp;<code>Alibaba Cloud Linux</code> 等特製系統" }
- :material-weight-lifter:{ .lg .middle } __功能強大、無與倫比__
---
全網最實用的開源運維腳本之一,效能卓越
- :material-compass-rose:{ .lg .middle } __精妙絕倫的互動設計__
---
易於理解和使用的互動式命令列介面,遙遙領先
</div>
<div style="display: flex; align-items: center; gap: 8px;">
<p>經過了數年的技術沉澱與生產環境檢驗,廣受社區好評,深得開發者喜愛,大廠都在使用</p>
<p>經過了數年的技術沉澱與生產環境檢驗,廣受社區好評,深得開發者喜愛,大廠都在使用</p>
<div class="icon-brand-section">
<div class="icon-brand-container no-select">
<a class="icon-brand-button" target="_blank" href="https://1panel.pro" title="1Panel">
@@ -392,3 +404,10 @@ hide:
如果提示不支援那麼請使用系統自備的套件管理工具進行安裝。因為這些軟體包由 Linux 發行版的軟體包維護者建構和維護,可能存在配置差異或由修改後的原始碼建構。
也可以使用 [Docker Desktop](https://www.docker.com/products/docker-desktop)
- ### 最佳實踐
<details>
<summary>適用於企業產品部署以及 CI/CD 等自動化維運場景的程式碼範例(展開檢視)</summary>
--8<-- "docs/other/example.md"
</details>

View File

@@ -8,7 +8,7 @@ nav:
- "介绍": index.md
- "使用方法": use/index.md
- "软件源列表": mirrors/index.md
- "其它工具": other/index.md
- "容器工具": other/index.md
- "更新日志": changelog/index.md
- "社区": community/index.md
- "赞助": sponsor/index.md
@@ -162,7 +162,7 @@ plugins:
"介绍": 介紹
"使用方法": 使用方法
"软件源列表": 軟體源列表
"其它工具": 其它工具
"容器工具": 容器工具
"更新日志": 更新日誌
"社区": 社群
"赞助": 贊助
@@ -184,7 +184,7 @@ plugins:
"介绍": Introduction
"使用方法": Use
"软件源列表": Mirrors List
"其它工具": Other Tools
"容器工具": Container Tools
"更新日志": Changelog
"社区": Community
"赞助": Sponsor