fix: update wg-easy to official ghcr image with iptables-nft #44
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix/vpn-iptables-nft-upstream"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The WireGuard VPN stack (
vpn_stack.service) fails to start with two issues:compose.ymlsetcontext: ./vpnbut the Dockerfile is at the same level as compose.yml, not in avpn/subdirectory.weejewel/wg-easy:latestis 4 years stale on Alpine 3.11, which doesn't have theiptables-nftpackage. After fixing the context, the build failed withERROR: unable to select packages: iptables-nft (no such package).Changes
assets/compose/vpn/compose.ymlcontext: ./vpn→context: .(Dockerfile is co-located)assets/compose/vpn/DockerfileFROM weejewel/wg-easy:latest→FROM ghcr.io/wg-easy/wg-easy:latest(officially maintained, modern Alpine/krypton)apk add iptables-nft+update-alternatives --setto flip fromiptables-legacytoiptables-nft(the official image defaults to legacy, which requires theiptable_natkernel module — missing on this host)ln -sfapproach with properupdate-alternativesAPIWhy we still need a custom image
The official
ghcr.io/wg-easy/wg-easy:latestexplicitly setsiptables-legacyas the default viaupdate-alternatives --install. Our host kernel lacks theiptable_natmodule, so we neediptables-nft(nftables-backed). The custom Dockerfile just flips the alternatives — 2 extra layers.Testing
After deploy: