mirror of
https://github.com/oneclickvirt/oneclickvirt.github.io.git
synced 2026-06-02 00:34:19 +08:00
fix: Docker现已支持开设带硬盘大小限制的容器
This commit is contained in:
@@ -22,10 +22,10 @@ curl -L https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/onedo
|
||||
|
||||
### Example
|
||||
|
||||
Run
|
||||
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)
|
||||
|
||||
```
|
||||
./onedocker.sh name cpu memory password sshport startport endport <independent_ipv6> <system>
|
||||
./onedocker.sh name cpu memory password sshport startport endport <independent_ipv6> <system> <disk>
|
||||
```
|
||||
|
||||
Currently, the system only supports selecting:
|
||||
@@ -52,9 +52,10 @@ The following is the information for the created example container:
|
||||
| Port Range for Internal and External Mapping | 34975 to 35000 |
|
||||
| Operating System | debian |
|
||||
| Whether to bind a separate IPV6 address| N |
|
||||
| Disk Size | 5G |
|
||||
|
||||
```shell
|
||||
./onedocker.sh test 1 512 123456 25000 34975 35000 N debian
|
||||
./onedocker.sh test 1 512 123456 25000 34975 35000 N debian 5
|
||||
```
|
||||
|
||||
### Related operations
|
||||
@@ -110,7 +111,7 @@ cat dclog
|
||||
The output format is
|
||||
|
||||
```
|
||||
Container_Name SSH_Port Root_Password Number_of_Cores Memory Start_of_Public_Port End_of_Public_Port
|
||||
Container_Name SSH_Port Root_Password Number_of_Cores Memory Start_of_Public_Port End_of_Public_Port Disk_Size
|
||||
```
|
||||
|
||||
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.
|
||||
|
||||
@@ -32,6 +32,7 @@ curl -L https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o
|
||||
- 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.
|
||||
- If all the above conditions are met, create ndpresponder docker and radvd so that IPV6 allocation supports ndp broadcasting and auto-allocation.
|
||||
- Support for x86_64 and ARM architecture servers
|
||||
- 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
|
||||
|
||||
Command:
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ The default creation of unprivileged containers, and does not mount and host doc
|
||||
|
||||
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.
|
||||
|
||||
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**.
|
||||
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.
|
||||
|
||||
## Configuration requirements
|
||||
|
||||
|
||||
@@ -28,10 +28,10 @@ curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt
|
||||
|
||||
### 示例
|
||||
|
||||
运行支持的变量
|
||||
运行支持的变量如下(硬盘大小仅在前面安装时选择了支持限制硬盘大小的,这块才可设置硬盘大小)
|
||||
|
||||
```
|
||||
./onedocker.sh name cpu memory password sshport startport endport <independent_ipv6> <system>
|
||||
./onedocker.sh name cpu memory password sshport startport endport <independent_ipv6> <system> <disk>
|
||||
```
|
||||
|
||||
目前system仅支持选择
|
||||
@@ -46,7 +46,7 @@ curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt
|
||||
默认不填则是debian
|
||||
|
||||
```shell
|
||||
./onedocker.sh test 1 512 123456 25000 34975 35000 N debian
|
||||
./onedocker.sh test 1 512 123456 25000 34975 35000 N debian 5
|
||||
```
|
||||
|
||||
以下为开设的示例容器的信息:
|
||||
@@ -62,6 +62,7 @@ curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt
|
||||
| 内外网映射端口一致的区间 | 34975到35000 |
|
||||
| 系统 | debian |
|
||||
| 是否绑定独立的IPV6地址 | N |
|
||||
| 硬盘大小 | 5G |
|
||||
|
||||
### 相关操作
|
||||
|
||||
@@ -124,7 +125,7 @@ cat dclog
|
||||
输出格式
|
||||
|
||||
```
|
||||
容器名字 SSH端口 登陆的root密码 核数 内存 外网端口起 外网端口止
|
||||
容器名字 SSH端口 登陆的root密码 核数 内存 外网端口起 外网端口止 硬盘大小
|
||||
```
|
||||
|
||||
一行一个容器对应的信息,docker的ipv6地址只能在容器内自己查询,在docker的配置中是不存在的
|
||||
|
||||
@@ -39,6 +39,7 @@ curl -L https://cdn.spiritlhl.net/https://raw.githubusercontent.com/spiritLHLS/a
|
||||
- 检测如果存在IPV6地址,检测其是否大于或等于/112,如果符合条件,则配置docker的ipv6的网络
|
||||
- 如果上述条件都符合,创建ndpresponder的docker和radvd,使得IPV6的分配支持ndp广播和自动分配
|
||||
- 支持x86_64和ARM架构的服务器
|
||||
- 安装过程中会要求你输入一些选项,选择Docker安装路径,选择Docker安装是否可限制硬盘
|
||||
|
||||
国际
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ outline: deep
|
||||
|
||||
默认安装并启用lxcfs,使得在容器内的查询资源时CPU和内存使用的是配置的视图而不是宿主机的视图
|
||||
|
||||
由于大部分云服务器是ext4文件系统,docker默认的存储引擎是overlayfs2,即便宿主机的文件系统是xfs,默认也不会启用pquota选项,所以**默认共享宿主机硬盘,无法限制每个容器的磁盘大小**
|
||||
默认可选择是否共享宿主机的硬盘,在Docker安装的时候可选择是否安装为可限制硬盘大小的环境
|
||||
|
||||
## 配置要求
|
||||
|
||||
|
||||
Reference in New Issue
Block a user