Skip to content

Commit 9e6e5fb

Browse files
committed
feat:增加containerd和podman的说明
1 parent 23193aa commit 9e6e5fb

24 files changed

+1904
-33
lines changed

docs/.vitepress/config.mts

Lines changed: 113 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -52,18 +52,49 @@ export default defineConfig({
5252
nav: [
5353
{
5454
text: '一键虚拟化项目',
55-
link: '/',
56-
activeMatch: '^/$|^/guide/'
55+
link: '/'
56+
},
57+
{
58+
text: '虚拟化平台',
59+
activeMatch: '^/guide/',
60+
items: [
61+
{ text: 'OneClickVirt', link: '/guide/oneclickvirt/oneclickvirt_precheck.html' },
62+
{ text: 'Proxmox VE', link: '/guide/pve/pve_precheck.html' },
63+
{ text: 'Incus', link: '/guide/incus/incus_precheck.html' },
64+
{ text: 'Docker', link: '/guide/docker/docker_precheck.html' },
65+
{ text: 'LXD', link: '/guide/lxd/lxd_precheck.html' },
66+
{ text: 'Containerd', link: '/guide/containerd/containerd_precheck.html' },
67+
{ text: 'Podman', link: '/guide/podman/podman_precheck.html' },
68+
{ text: '屏蔽滥用', link: '/guide/block/block_iptables.html' },
69+
]
5770
},
5871
{
5972
text: '其他虚拟化项目',
60-
link: '/incomplete/index',
61-
activeMatch: '^/incomplete/'
73+
activeMatch: '^/incomplete/',
74+
items: [
75+
{ text: 'webvirtcloud', link: '/incomplete/webvirtcloud.html' },
76+
{ text: 'webvirtcloud_retspen', link: '/incomplete/webvirtcloud_retspen.html' },
77+
{ text: 'pterodactyl', link: '/incomplete/pterodactyl.html' },
78+
{ text: 'convoy', link: '/incomplete/convoy.html' },
79+
{ text: 'cockpit', link: '/incomplete/cockpit.html' },
80+
{ text: 'virtfusion', link: '/incomplete/virtfusion.html' },
81+
{ text: 'virtualizor-docker', link: '/incomplete/virtualizor-docker.html' },
82+
{ text: 'bashvm', link: '/incomplete/bashvm.html' },
83+
{ text: 'webvirtmgr', link: '/incomplete/webvirtmgr.html' },
84+
]
6285
},
6386
{
6487
text: '其他实用项目',
65-
link: '/case/index',
66-
activeMatch: '^/case/'
88+
activeMatch: '^/case/',
89+
items: [
90+
{ text: '1. VPS融合怪服务器测评脚本', link: '/case/case1.html' },
91+
{ text: '2. 一键修复与安装脚本', link: '/case/case2.html' },
92+
{ text: '3. 自动更新测试服务器节点列表的网络基准测试脚本', link: '/case/case3.html' },
93+
{ text: '4. 三网回程路由线路测试脚本', link: '/case/case4.html' },
94+
{ text: '5. 服务器资源占用脚本', link: '/case/case5.html' },
95+
{ text: '6. 为linux服务器增加swap分区', link: '/case/case6.html' },
96+
{ text: '7. 为linux服务器启用zram设备', link: '/case/case7.html' },
97+
]
6798
},
6899
{ text: '融合怪商家收录', link: 'https://paste.spiritlhl.net/' },
69100
{ text: 'VPS余量监控', link: 'https://spiders.spiritlhl.net/' },
@@ -91,8 +122,36 @@ export default defineConfig({
91122
pattern: 'https://github.com/oneclickvirt/oneclickvirt.github.io/edit/main/docs/:path',
92123
},
93124
nav: [
94-
{ text: 'One Click Virtualization', link: '/en/', activeMatch: '^/en/guide/' },
95-
{ text: 'Other Virtualization Projects', link: '/en/incomplete/index', activeMatch: '^/en/incomplete/' },
125+
{ text: 'One Click Virtualization', link: '/en/' },
126+
{
127+
text: 'Virtualization Platforms',
128+
activeMatch: '^/en/guide/',
129+
items: [
130+
{ text: 'OneClickVirt', link: '/en/guide/oneclickvirt/oneclickvirt_precheck.html' },
131+
{ text: 'Proxmox VE', link: '/en/guide/pve/pve_precheck.html' },
132+
{ text: 'Incus', link: '/en/guide/incus/incus_precheck.html' },
133+
{ text: 'Docker', link: '/en/guide/docker/docker_precheck.html' },
134+
{ text: 'LXD', link: '/en/guide/lxd/lxd_precheck.html' },
135+
{ text: 'Containerd', link: '/en/guide/containerd/containerd_precheck.html' },
136+
{ text: 'Podman', link: '/en/guide/podman/podman_precheck.html' },
137+
{ text: 'Block Abuse', link: '/en/guide/block/block_iptables.html' },
138+
]
139+
},
140+
{
141+
text: 'Other Virtualization Projects',
142+
activeMatch: '^/en/incomplete/',
143+
items: [
144+
{ text: 'webvirtcloud', link: '/en/incomplete/webvirtcloud.html' },
145+
{ text: 'webvirtcloud_retspen', link: '/en/incomplete/webvirtcloud_retspen.html' },
146+
{ text: 'pterodactyl', link: '/en/incomplete/pterodactyl.html' },
147+
{ text: 'convoy', link: '/en/incomplete/convoy.html' },
148+
{ text: 'cockpit', link: '/en/incomplete/cockpit.html' },
149+
{ text: 'virtfusion', link: '/en/incomplete/virtfusion.html' },
150+
{ text: 'virtualizor-docker', link: '/en/incomplete/virtualizor-docker.html' },
151+
{ text: 'bashvm', link: '/en/incomplete/bashvm.html' },
152+
{ text: 'webvirtmgr', link: '/en/incomplete/webvirtmgr.html' },
153+
]
154+
},
96155
{ text: 'Merchant List', link: 'https://paste.spiritlhl.net/' },
97156
{ text: 'VPS Stock Monitor', link: 'https://spiders.spiritlhl.net/' },
98157
],
@@ -205,6 +264,26 @@ function getGuideSidebarZhCN() {
205264
{ text: '在DOCKER上', link: '/guide/block/block_docker.html' },
206265
]
207266
},
267+
{
268+
text: 'Containerd',
269+
items: [
270+
{ text: '系统和配置要求', link: '/guide/containerd/containerd_precheck.html' },
271+
{ text: 'Containerd主体安装', link: '/guide/containerd/containerd_install.html' },
272+
{ text: 'Linux容器(LXC)', link: '/guide/containerd/containerd_build.html' },
273+
{ text: '致谢', link: '/guide/containerd/containerd_thanks.html' },
274+
{ text: '常见问题答疑', link: '/guide/containerd/containerd_qa.html' }
275+
]
276+
},
277+
{
278+
text: 'Podman',
279+
items: [
280+
{ text: '系统和配置要求', link: '/guide/podman/podman_precheck.html' },
281+
{ text: 'Podman主体安装', link: '/guide/podman/podman_install.html' },
282+
{ text: 'Linux容器(LXC)', link: '/guide/podman/podman_build.html' },
283+
{ text: '致谢', link: '/guide/podman/podman_thanks.html' },
284+
{ text: '常见问题答疑', link: '/guide/podman/podman_qa.html' }
285+
]
286+
},
208287
{
209288
text: '捐赠',
210289
items: [
@@ -339,17 +418,37 @@ function getGuideSidebarEnUS() {
339418
{
340419
text: 'Block Abuse',
341420
items: [
342-
{ text: 'via iptables', link: '/guide/block/block_iptables.html' },
343-
{ text: 'In PVE', link: '/guide/block/block_pve.html' },
344-
{ text: 'In INCUS', link: '/guide/block/block_incus.html' },
345-
{ text: 'In LXD', link: '/guide/block/block_lxd.html' },
346-
{ text: 'In DOCKER', link: '/guide/block/block_docker.html' },
421+
{ text: 'via iptables', link: '/en/guide/block/block_iptables.html' },
422+
{ text: 'In PVE', link: '/en/guide/block/block_pve.html' },
423+
{ text: 'In INCUS', link: '/en/guide/block/block_incus.html' },
424+
{ text: 'In LXD', link: '/en/guide/block/block_lxd.html' },
425+
{ text: 'In DOCKER', link: '/en/guide/block/block_docker.html' },
426+
]
427+
},
428+
{
429+
text: 'Containerd',
430+
items: [
431+
{ text: 'System & configuration requirements', link: '/en/guide/containerd/containerd_precheck.html' },
432+
{ text: 'Containerd main installation', link: '/en/guide/containerd/containerd_install.html' },
433+
{ text: 'Linux Container(LXC)', link: '/en/guide/containerd/containerd_build.html' },
434+
{ text: 'Acknowledgements', link: '/en/guide/containerd/containerd_thanks.html' },
435+
{ text: 'FAQ', link: '/en/guide/containerd/containerd_qa.html' }
436+
]
437+
},
438+
{
439+
text: 'Podman',
440+
items: [
441+
{ text: 'System & configuration requirements', link: '/en/guide/podman/podman_precheck.html' },
442+
{ text: 'Podman main installation', link: '/en/guide/podman/podman_install.html' },
443+
{ text: 'Linux Container(LXC)', link: '/en/guide/podman/podman_build.html' },
444+
{ text: 'Acknowledgements', link: '/en/guide/podman/podman_thanks.html' },
445+
{ text: 'FAQ', link: '/en/guide/podman/podman_qa.html' }
347446
]
348447
},
349448
{
350449
text: 'Donation',
351450
items: [
352-
{ text: 'Donation', link: '/guide/dashboardq.html' }
451+
{ text: 'Donation', link: '/en/guide/dashboardq.html' }
353452
]
354453
}
355454
];
Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
---
2+
outline: deep
3+
---
4+
5+
# Preface
6+
7+
Two methods for provisioning containers.
8+
9+
## Single Container Provisioning
10+
11+
- Creates a single containerd container, automatically detects international or China mainland server
12+
- Can configure binding of an independent IPv6 address (requires host with public IPv6 and containerd-ipv6 network configured during installation)
13+
- Supports x86_64 and ARM64 architecture servers
14+
15+
### Download Script
16+
17+
International
18+
19+
```shell
20+
wget -q https://raw.githubusercontent.com/oneclickvirt/containerd/main/scripts/onecontainerd.sh
21+
chmod +x onecontainerd.sh
22+
```
23+
24+
China Mainland
25+
26+
```shell
27+
wget -q https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/containerd/main/scripts/onecontainerd.sh
28+
chmod +x onecontainerd.sh
29+
```
30+
31+
### Example
32+
33+
Supported variables for running:
34+
35+
```bash
36+
./onecontainerd.sh <name> <cpu> <memory_mb> <password> <sshport> <startport> <endport> [independent_ipv6:y/n] [system] [disk_gb]
37+
```
38+
39+
Currently supported `system` values:
40+
41+
- debian
42+
- ubuntu
43+
- alpine
44+
- almalinux
45+
- rockylinux
46+
- openeuler
47+
48+
Default is debian if not specified.
49+
50+
```shell
51+
./onecontainerd.sh ct1 1 512 MyPassword 25000 34975 35000 n debian 0
52+
```
53+
54+
Example container information:
55+
56+
| Attribute | Value |
57+
|-----------|-------|
58+
| Container name | ct1 |
59+
| SSH username | root |
60+
| SSH password | MyPassword |
61+
| CPU cores | 1 |
62+
| Memory | 512MB |
63+
| SSH port | 25000 |
64+
| External/internal port range | 34975 to 35000 |
65+
| System | debian |
66+
| Independent IPv6 | N |
67+
| Disk size | Unlimited |
68+
69+
### Related Operations
70+
71+
List all containers
72+
73+
```shell
74+
nerdctl ps -a
75+
```
76+
77+
Enter container
78+
79+
```shell
80+
nerdctl exec -it ct1 bash
81+
```
82+
83+
Enter Alpine container
84+
85+
```shell
86+
nerdctl exec -it ct1 sh
87+
```
88+
89+
Type `exit` to leave the container.
90+
91+
Delete container
92+
93+
```shell
94+
nerdctl rm -f ct1
95+
```
96+
97+
View container logs
98+
99+
```shell
100+
nerdctl logs ct1
101+
```
102+
103+
## Batch Container Provisioning
104+
105+
- Multiple runs inherit configuration and generate sequentially
106+
- Auto-increments container name (ct1, ct2, ...), SSH port, and public ports
107+
- Container information recorded to `ctlog` file
108+
- Recommended to run in screen to avoid SSH disconnection
109+
110+
### Run
111+
112+
International
113+
114+
```shell
115+
wget -q https://raw.githubusercontent.com/oneclickvirt/containerd/main/scripts/create_containerd.sh
116+
chmod +x create_containerd.sh
117+
./create_containerd.sh
118+
```
119+
120+
China Mainland
121+
122+
```shell
123+
wget -q https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/containerd/main/scripts/create_containerd.sh
124+
chmod +x create_containerd.sh
125+
./create_containerd.sh
126+
```
127+
128+
### Query Batch Container Information
129+
130+
```shell
131+
cat ctlog
132+
```
133+
134+
Output format:
135+
136+
```
137+
container_name ssh_port root_password cpu_cores memory_mb start_port end_port disk_gb
138+
```
139+
140+
One line per container.
141+
142+
## Remove All Containers and Images
143+
144+
```shell
145+
nerdctl ps -aq | xargs -r nerdctl rm -f
146+
nerdctl images -q | xargs -r nerdctl rmi -f
147+
rm -rf ctlog
148+
```
149+
150+
## Restart All Containers After Host Reboot
151+
152+
By default, containers are not configured to auto-restart. Run the following command to start all stopped containers:
153+
154+
```shell
155+
nerdctl ps -aq -f status=exited | xargs -r nerdctl start
156+
```
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
---
2+
outline: deep
3+
---
4+
5+
# Preface
6+
7+
Install the containerd environment, including containerd + runc + nerdctl + CNI + buildkitd full suite.
8+
9+
## Setting Up Virtual Memory
10+
11+
:::tip
12+
Allocate some swap space to prevent your machine from crashing.
13+
:::
14+
15+
Unit conversion: Inputting 1024 results in 1G of SWAP - virtual memory. Virtual memory occupies disk space and is automatically utilized when the physical memory is insufficient. However, this leads to high IO usage and CPU performance overhead.
16+
17+
It is recommended to allocate virtual memory twice the size of your physical memory.
18+
19+
```shell
20+
curl -L https://raw.githubusercontent.com/spiritLHLS/addswap/main/addswap.sh -o addswap.sh && chmod +x addswap.sh && bash addswap.sh
21+
```
22+
23+
## Environment Setup
24+
25+
- Supported systems: Ubuntu, Debian, RockyLinux 9+, AlmaLinux 9+, CentOS 9+, Alpine, Arch
26+
- Installs containerd + runc + nerdctl + CNI + buildkitd (via nerdctl-full bundle)
27+
- Automatically configures CNI network (containerd-net: 172.20.0.0/16) with iptables NAT rules
28+
- Detects public IPv6 address; if present, automatically creates containerd-ipv6 CNI network and starts NDP Responder
29+
- Installs DNS liveness check service (check-dns.service)
30+
- Supports x86_64 and ARM64 architecture servers
31+
32+
International
33+
34+
```shell
35+
bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/containerd/main/containerdinstall.sh)
36+
```
37+
38+
China Mainland
39+
40+
```shell
41+
bash <(wget -qO- https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/containerd/main/containerdinstall.sh)
42+
```
43+
44+
:::tip
45+
After installation, run `nerdctl ps -a` to verify the containerd environment is working correctly.
46+
:::
47+
48+
## Uninstall containerd Environment
49+
50+
One-click uninstall of the entire containerd environment, including all containers, images, CNI networks, systemd services, and nerdctl/containerd binaries:
51+
52+
International
53+
54+
```shell
55+
bash <(wget -qO- https://raw.githubusercontent.com/oneclickvirt/containerd/main/containerduninstall.sh)
56+
```
57+
58+
China Mainland
59+
60+
```shell
61+
bash <(wget -qO- https://cdn.spiritlhl.net/https://raw.githubusercontent.com/oneclickvirt/containerd/main/containerduninstall.sh)
62+
```
63+
64+
:::warning
65+
The script requires entering `yes` to confirm before execution. This operation is irreversible. Deleted content includes all containers, images, and CNI network configurations.
66+
Retest workflow: Run uninstall first, then run install to verify the entire installation process from scratch.
67+
:::

0 commit comments

Comments
 (0)