~修复 Docker 仅挂载 configs 时重建容器丢失内核配置的问题:补充 yamls/jsons 卷挂载

This commit is contained in:
纯白色冰淇淋
2026-08-11 14:08:53 +08:00
parent d37267bceb
commit 376197c654
2 changed files with 7 additions and 1 deletions
+3 -1
View File
@@ -89,6 +89,8 @@ mkdir -p /root/ShellCrash
docker run -d \ docker run -d \
……………… ………………
-v shellcrash_configs:/etc/ShellCrash/configs \ -v shellcrash_configs:/etc/ShellCrash/configs \
-v shellcrash_yamls:/etc/ShellCrash/yamls \
-v shellcrash_jsons:/etc/ShellCrash/jsons \
……………… ………………
``` ```
@@ -134,7 +136,7 @@ docker rm -f shellcrash
### Docker删除卷 ### Docker删除卷
```shell ```shell
docker volume rm shellcrash_configs docker volume rm shellcrash_configs shellcrash_yamls shellcrash_jsons
``` ```
### Compose删除容器&卷 ### Compose删除容器&卷
+4
View File
@@ -18,10 +18,14 @@ services:
# - net.ipv6.conf.all.forwarding=1 # - net.ipv6.conf.all.forwarding=1
volumes: volumes:
- shellcrash_configs:/etc/ShellCrash/configs:rw - shellcrash_configs:/etc/ShellCrash/configs:rw
- shellcrash_yamls:/etc/ShellCrash/yamls:rw
- shellcrash_jsons:/etc/ShellCrash/jsons:rw
restart: unless-stopped restart: unless-stopped
volumes: volumes:
shellcrash_configs: shellcrash_configs:
shellcrash_yamls:
shellcrash_jsons:
networks: networks:
macvlan_lan: macvlan_lan: