~优化容器部署说明,修复持久化问题

This commit is contained in:
juewuy
2026-02-04 18:46:25 +08:00
parent f70e642fea
commit ace8b08407
2 changed files with 28 additions and 9 deletions

View File

@@ -87,14 +87,10 @@ mkdir -p /root/ShellCrash
```shell ```shell
docker run -d \ docker run -d \
……………… ………………
-v /root/ShellCrash:/etc/ShellCrash \ -v shellcrash_configs:/etc/ShellCrash/configs \
……………… ………………
``` ```
------
------ ------
## Compose DeploymentCompose部署 ## Compose DeploymentCompose部署
@@ -102,8 +98,8 @@ docker run -d \
### 1. 创建宿主机目录并进入目录 ### 1. 创建宿主机目录并进入目录
```shell ```shell
mkdir -p /root/ShellCrash mkdir -p /tmp/ShellCrash
cd /root/ShellCrash cd /tmp/ShellCrash
``` ```
### 2. 下载Compose模版 ### 2. 下载Compose模版
@@ -126,7 +122,27 @@ docker compose up -d
------ ------
### Notes ## Delete移除容器镜像或删除卷
### Docker删除容器
```shell
docker rm -f shellcrash
```
### Docker删除卷
```shell
docker volume rm shellcrash_configs
```
### Compose删除容器&卷
```shell
docker-compose down -v
```
## Notes
- 旁路由模式需要宿主机支持 `TUN` - 旁路由模式需要宿主机支持 `TUN`
- macvlan 网络下宿主机默认无法直接访问容器 IP - macvlan 网络下宿主机默认无法直接访问容器 IP

View File

@@ -16,9 +16,12 @@ services:
sysctls: sysctls:
net.ipv4.ip_forward: 1 net.ipv4.ip_forward: 1
volumes: volumes:
- /etc/ShellCrash:/root/ShellCrash - shellcrash_configs:/etc/ShellCrash/configs:rw
restart: unless-stopped restart: unless-stopped
volumes:
shellcrash_configs:
networks: networks:
macvlan_lan: macvlan_lan:
name: macvlan_lan name: macvlan_lan