mirror of
https://github.com/pcvolkmer/docker-wireguard-boringtun.git
synced 2025-04-19 13:26:50 +00:00
This will add a DNS config to the client configurations pointing to the wireguard server. With this configuration, all DNS requests are sent through the VPN and are no longer answered by the local DNS server. Each client now has a hostname like <device>-client<id>.
24 lines
560 B
Docker
24 lines
560 B
Docker
FROM rust:slim AS build
|
|
|
|
RUN rustup target add x86_64-unknown-linux-musl
|
|
RUN apt update && apt install -y musl-tools musl-dev
|
|
RUN cargo install --target x86_64-unknown-linux-musl boringtun-cli
|
|
|
|
###
|
|
|
|
FROM alpine
|
|
|
|
ENV WG_QUICK_USERSPACE_IMPLEMENTATION boringtun
|
|
ENV WG_LOG_LEVEL info
|
|
ENV WG_LOG_FILE /var/log/boringtun
|
|
ENV WG_SUDO 1
|
|
|
|
RUN apk --update add iproute2 wireguard-tools-wg-quick libqrencode dnsmasq
|
|
|
|
WORKDIR /scripts
|
|
|
|
COPY --from=build /usr/local/cargo/bin/boringtun-cli /usr/local/bin/boringtun
|
|
COPY scripts/ ./
|
|
|
|
ENTRYPOINT ["/scripts/entrypoint.sh"]
|