update-alternatives --set fails because the base image only registers iptables-legacy as an alternative. The iptables-nft binary (/usr/sbin/iptables-nft) exists but isn't in the alternatives database. Direct ln -sf bypasses this.
10 lines
487 B
Docker
10 lines
487 B
Docker
# Custom wg-easy with iptables-nft (nftables-backed iptables)
|
|
# Fixes crash-loop when host kernel lacks legacy iptable_nat module.
|
|
FROM ghcr.io/wg-easy/wg-easy:latest
|
|
|
|
# The upstream image registers only iptables-legacy with update-alternatives.
|
|
# iptables-nft binary exists but isn't registered as an alternative key.
|
|
# 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
|