Compare commits

...

2 Commits

Author SHA1 Message Date
7e2b133946 fix: use ln -sf instead of update-alternatives --set
update-alternatives fails because iptables-nft isn't registered
as an alternative key (only iptables-legacy was registered by
the official Dockerfile). Direct symlink override works.
2026-05-13 12:57:12 -04:00
611e96b306 fix: remove apk add iptables-nft — built-in on Alpine 3.18+
In Alpine 3.18+, the 'iptables' package IS the nftables variant.
iptables-nft is not a separate package. The binary is already in
the base image — only need to flip update-alternatives.
2026-05-13 12:48:51 -04:00

View File

@@ -2,9 +2,8 @@
# Fixes crash-loop when host kernel lacks legacy iptable_nat module.
FROM ghcr.io/wg-easy/wg-easy:latest
# The upstream image defaults to iptables-legacy via update-alternatives.
# Switch to iptables-nft so it works on kernels where only nftables
# netfilter modules are available (iptable_nat module missing).
RUN apk add --no-cache iptables-nft && \
update-alternatives --set iptables /usr/sbin/iptables-nft && \
update-alternatives --set ip6tables /usr/sbin/ip6tables-nft
# The upstream image registers only iptables-legacy with update-alternatives.
# iptables-nft binary exists but isn't registered as an alternative.
# Override the alternatives-managed symlinks directly.
RUN ln -sf /usr/sbin/iptables-nft /usr/sbin/iptables && \
ln -sf /usr/sbin/ip6tables-nft /usr/sbin/ip6tables