Skip to content

Commit 80de374

Browse files
committed
fix: Docker现已支持开设带硬盘大小限制的容器
1 parent a6f34c5 commit 80de374

File tree

6 files changed

+14
-10
lines changed

6 files changed

+14
-10
lines changed

docs/en/guide/docker/docker_build.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ curl -L https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/onedo
2222

2323
### Example
2424

25-
Run
25+
Running the supported variables are as follows (hard disk size can be set in this block only if the support for limiting the hard disk size was selected during the previous installation)
2626

2727
```
28-
./onedocker.sh name cpu memory password sshport startport endport <independent_ipv6> <system>
28+
./onedocker.sh name cpu memory password sshport startport endport <independent_ipv6> <system> <disk>
2929
```
3030

3131
Currently, the system only supports selecting:
@@ -52,9 +52,10 @@ The following is the information for the created example container:
5252
| Port Range for Internal and External Mapping | 34975 to 35000 |
5353
| Operating System | debian |
5454
| Whether to bind a separate IPV6 address| N |
55+
| Disk Size | 5G |
5556

5657
```shell
57-
./onedocker.sh test 1 512 123456 25000 34975 35000 N debian
58+
./onedocker.sh test 1 512 123456 25000 34975 35000 N debian 5
5859
```
5960

6061
### Related operations
@@ -110,7 +111,7 @@ cat dclog
110111
The output format is
111112

112113
```
113-
Container_Name SSH_Port Root_Password Number_of_Cores Memory Start_of_Public_Port End_of_Public_Port
114+
Container_Name SSH_Port Root_Password Number_of_Cores Memory Start_of_Public_Port End_of_Public_Port Disk_Size
114115
```
115116

116117
One line corresponds to information about a container, the docker's ipv6 address can only be looked up within the container itself, it doesn't exist in the docker's configuration.

docs/en/guide/docker/docker_install.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ curl -L https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o
3232
- Detect if there is an IPV6 address, check if it is greater than or equal to /112, and if so, configure the docker's ipv6 network.
3333
- If all the above conditions are met, create ndpresponder docker and radvd so that IPV6 allocation supports ndp broadcasting and auto-allocation.
3434
- Support for x86_64 and ARM architecture servers
35+
- The installation process will ask you to enter some options, select the Docker installation path, select whether the Docker installation can limit the hard disk
3536

3637
Command:
3738

docs/en/guide/docker/docker_precheck.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ The default creation of unprivileged containers, and does not mount and host doc
2121

2222
By default, lxcfs is installed and enabled, so that when querying resources within a container, CPU and memory use the configured view instead of the host's view.
2323

24-
Since most cloud servers have ext4 filesystems, even xfs filesystems do not enable the pquota option, so **sharing the host's hard disk by default does not limit the disk size of each container**.
24+
By default, you can choose whether or not to share the hard disk of the host machine, and you can choose whether or not to install it as an environment that can limit the size of the hard disk during Docker installation.
2525

2626
## Configuration requirements
2727

docs/guide/docker/docker_build.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt
2828

2929
### 示例
3030

31-
运行支持的变量
31+
运行支持的变量如下(硬盘大小仅在前面安装时选择了支持限制硬盘大小的,这块才可设置硬盘大小)
3232

3333
```
34-
./onedocker.sh name cpu memory password sshport startport endport <independent_ipv6> <system>
34+
./onedocker.sh name cpu memory password sshport startport endport <independent_ipv6> <system> <disk>
3535
```
3636

3737
目前system仅支持选择
@@ -46,7 +46,7 @@ curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt
4646
默认不填则是debian
4747

4848
```shell
49-
./onedocker.sh test 1 512 123456 25000 34975 35000 N debian
49+
./onedocker.sh test 1 512 123456 25000 34975 35000 N debian 5
5050
```
5151

5252
以下为开设的示例容器的信息:
@@ -62,6 +62,7 @@ curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt
6262
| 内外网映射端口一致的区间 | 34975到35000 |
6363
| 系统 | debian |
6464
| 是否绑定独立的IPV6地址 | N |
65+
| 硬盘大小 | 5G |
6566

6667
### 相关操作
6768

@@ -124,7 +125,7 @@ cat dclog
124125
输出格式
125126

126127
```
127-
容器名字 SSH端口 登陆的root密码 核数 内存 外网端口起 外网端口止
128+
容器名字 SSH端口 登陆的root密码 核数 内存 外网端口起 外网端口止 硬盘大小
128129
```
129130

130131
一行一个容器对应的信息,docker的ipv6地址只能在容器内自己查询,在docker的配置中是不存在的

docs/guide/docker/docker_install.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritLHLS/a
3939
- 检测如果存在IPV6地址,检测其是否大于或等于/112,如果符合条件,则配置docker的ipv6的网络
4040
- 如果上述条件都符合,创建ndpresponder的docker和radvd,使得IPV6的分配支持ndp广播和自动分配
4141
- 支持x86_64和ARM架构的服务器
42+
- 安装过程中会要求你输入一些选项,选择Docker安装路径,选择Docker安装是否可限制硬盘
4243

4344
国际
4445

docs/guide/docker/docker_precheck.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ outline: deep
2424

2525
默认安装并启用lxcfs,使得在容器内的查询资源时CPU和内存使用的是配置的视图而不是宿主机的视图
2626

27-
由于大部分云服务器是ext4文件系统,docker默认的存储引擎是overlayfs2,即便宿主机的文件系统是xfs,默认也不会启用pquota选项,所以**默认共享宿主机硬盘,无法限制每个容器的磁盘大小**
27+
默认可选择是否共享宿主机的硬盘,在Docker安装的时候可选择是否安装为可限制硬盘大小的环境
2828

2929
## 配置要求
3030

0 commit comments

Comments
 (0)