From ace8b08407bb0f5dd5275656ac95d0281f3f5c24 Mon Sep 17 00:00:00 2001 From: juewuy Date: Wed, 4 Feb 2026 18:46:25 +0800 Subject: [PATCH] =?UTF-8?q?~=E4=BC=98=E5=8C=96=E5=AE=B9=E5=99=A8=E9=83=A8?= =?UTF-8?q?=E7=BD=B2=E8=AF=B4=E6=98=8E=EF=BC=8C=E4=BF=AE=E5=A4=8D=E6=8C=81?= =?UTF-8?q?=E4=B9=85=E5=8C=96=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker/README.md | 32 ++++++++++++++++++++++++-------- docker/compose.yml | 5 ++++- 2 files changed, 28 insertions(+), 9 deletions(-) diff --git a/docker/README.md b/docker/README.md index f0a25b2d..441b5709 100644 --- a/docker/README.md +++ b/docker/README.md @@ -87,14 +87,10 @@ mkdir -p /root/ShellCrash ```shell docker run -d \ ……………… - -v /root/ShellCrash:/etc/ShellCrash \ + -v shellcrash_configs:/etc/ShellCrash/configs \ ……………… ``` ------- - - - ------ ## Compose Deployment(Compose部署) @@ -102,8 +98,8 @@ docker run -d \ ### 1. 创建宿主机目录并进入目录 ```shell -mkdir -p /root/ShellCrash -cd /root/ShellCrash +mkdir -p /tmp/ShellCrash +cd /tmp/ShellCrash ``` ### 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` - macvlan 网络下宿主机默认无法直接访问容器 IP diff --git a/docker/compose.yml b/docker/compose.yml index 9d41cd27..8c59972a 100644 --- a/docker/compose.yml +++ b/docker/compose.yml @@ -16,9 +16,12 @@ services: sysctls: net.ipv4.ip_forward: 1 volumes: - - /etc/ShellCrash:/root/ShellCrash + - shellcrash_configs:/etc/ShellCrash/configs:rw restart: unless-stopped +volumes: + shellcrash_configs: + networks: macvlan_lan: name: macvlan_lan