FROM debian:latest RUN apt update && apt install -y curl build-essential clang cmake pkg-config libssl-dev RUN curl https://sh.rustup.rs -sSf | sh -s -- -y ENV PATH="/root/.cargo/bin:${PATH}" RUN cargo install boringtun-cli RUN mkdir -p /etc/wireguard && \ echo "[Interface]\n\ PrivateKey = $PRIVATEKEY\n\ Address = 10.0.0.1/24\n\ ListenPort = 7860\n\n\ [Peer]\n\ PublicKey = $PUBLICKEY\n\ AllowedIPs = 10.0.0.2/32" > /etc/wireguard/wg0.conf ENTRYPOINT ["boringtun-cli", "--foreground", "wg0"]