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