Skip to content

Commit b4b98bb

Browse files
committed
feat: 添加检测Docker是否支持限制容器硬盘大小的命令
1 parent adaa2cd commit b4b98bb

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

docs/en/guide/docker/docker_install.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,16 @@ bash dockerinstall.sh
4949
:::tip
5050
The environment installation process may require you to reboot the server and then execute the script again, see the instructions after the script is run for more details
5151
:::
52+
53+
## Detect whether Docker supports limiting container hard disk size
54+
55+
```shell
56+
curl -L https://raw.githubusercontent.com/oneclickvirt/docker/refs/heads/main/extra_scripts/disk_test.sh -o disk_test.sh && chmod +x disk_test.sh && bash disk_test.sh
57+
```
58+
59+
Or specify a different storage limit size (in MB), the default test of the 500MB limit of the container whether the limit is successful
60+
61+
```shell
62+
# 1GB Limit
63+
bash disk_test.sh 1000
64+
```

docs/guide/docker/docker_install.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,24 @@ bash dockerinstall.sh
6262
:::tip
6363
环境安装过程中可能要求你重启服务器后再次执行脚本,详见脚本运行后的说明
6464
:::
65+
66+
## 检测Docker是否支持限制容器硬盘大小
67+
68+
国际
69+
70+
```shell
71+
curl -L https://raw.githubusercontent.com/oneclickvirt/docker/refs/heads/main/extra_scripts/disk_test.sh -o disk_test.sh && chmod +x disk_test.sh && bash disk_test.sh
72+
```
73+
74+
国内
75+
76+
```shell
77+
curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/docker/refs/heads/main/extra_scripts/disk_test.sh -o disk_test.sh && chmod +x disk_test.sh && bash disk_test.sh
78+
```
79+
80+
或者指定不同的存储限制大小(单位:MB),默认测试500MB限制的容器是否限制成功
81+
82+
```shell
83+
# 1GB限制
84+
bash disk_test.sh 1000
85+
```

0 commit comments

Comments
 (0)