This repository provides a containerized Wireguard VPN solution, including health checks.
docker run -i --rm eftechcombr/wireguard wg genkey | tee ./etc/privatekey | docker run -i --rm eftechcombr/wireguard wg pubkey > ./etc/publickey- Place your Wireguard configuration in
etc/wg0.conf. - Keys should be stored in
etc/privatekeyandetc/publickey.
docker build -t eftechcombr/wireguard .
docker run --rm -it \
--cap-add=NET_ADMIN \
-v $(pwd)/etc:/etc/wireguard \
eftechcombr/wireguardA health check script is provided:
python wireguard_healthcheck.py| Variable | Description | Default |
|---|---|---|
| WG_CONF | Path to Wireguard config file | /etc/wireguard/wg0.conf |
| WG_PRIVATE_KEY | Path to private key file | /etc/wireguard/privatekey |
| WG_PUBLIC_KEY | Path to public key file | /etc/wireguard/publickey |
| WG_INTERFACE | Wireguard interface name | wg0 |
etc/
privatekey
publickey
wg0.conf
wireguard_healthcheck.py
Dockerfile
entrypoint.sh
- Generate keys: see above
- Run health check:
python wireguard_healthcheck.py - Build Docker image:
docker build -t eftechcombr/wireguard . - Run container: see above
MIT