mirror of
https://github.com/juewuy/ShellCrash.git
synced 2026-03-12 08:21:40 +00:00
~优化容器部署说明,修复持久化问题
This commit is contained in:
@@ -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 Deployment(Compose部署)
|
## Compose Deployment(Compose部署)
|
||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user