~修复docker相关bug

This commit is contained in:
juewuy
2026-02-08 18:25:47 +08:00
parent fc1c3c4415
commit 053f05d394
3 changed files with 4 additions and 3 deletions

View File

@@ -57,8 +57,7 @@ RUN apk add --no-cache \
ca-certificates \ ca-certificates \
tzdata \ tzdata \
nftables \ nftables \
iproute2 \ iproute2
dcron
RUN ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime && \ RUN ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime && \
echo "${TZ}" > /etc/timezone echo "${TZ}" > /etc/timezone

View File

@@ -57,6 +57,7 @@ docker run -d \
--cap-add NET_ADMIN \ --cap-add NET_ADMIN \
--cap-add NET_RAW \ --cap-add NET_RAW \
--cap-add SYS_ADMIN \ --cap-add SYS_ADMIN \
--sysctl net.ipv4.ip_forward=1 \
--device /dev/net/tun:/dev/net/tun \ --device /dev/net/tun:/dev/net/tun \
--restart unless-stopped \ --restart unless-stopped \
juewuy/shellcrash:latest juewuy/shellcrash:latest

View File

@@ -14,7 +14,8 @@ services:
devices: devices:
- "/dev/net/tun:/dev/net/tun" - "/dev/net/tun:/dev/net/tun"
sysctls: sysctls:
net.ipv4.ip_forward: 1 - net.ipv4.ip_forward: 1
# - net.ipv6.conf.all.forwarding=1
volumes: volumes:
- shellcrash_configs:/etc/ShellCrash/configs:rw - shellcrash_configs:/etc/ShellCrash/configs:rw
restart: unless-stopped restart: unless-stopped