WireGuard server in the Docker
container.
- Docker Registry @monstrenyatko/wireguard-server
- GitHub @monstrenyatko/docker-wireguard-server
-
Prepare
Docker
host kernel- The
WireGuard
kernel module must be available inDocker
host kernel - See official installation instructions, usually, it is as trivial as:
sudo apt install wireguard
- The
-
Configure environment:
-
WIREGUARD_SERVER_PORT
: theWireGuard
server listening port number, make sure to use same value in the config fileexport WIREGUARD_SERVER_PORT=51820
-
WIREGUARD_SERVER_CONFIG
: path toconfig
file:export WIREGUARD_SERVER_CONFIG="<path-to-wireguard-config-file>"
-
DOCKER_REGISTRY
: [OPTIONAL] registry prefix to pull image from a customDocker
registry:export DOCKER_REGISTRY="my_registry_hostname:5000/"
-
-
Pull prebuilt
Docker
image:docker-compose pull
-
Start prebuilt image:
docker-compose up -d
-
Stop/Restart:
docker-compose stop docker-compose start
-
default
target platform:cd <path to sources> DOCKER_BUILDKIT=1 docker build --tag <tag name> .
-
arm/v6
target platform:cd <path to sources> DOCKER_BUILDKIT=1 docker build --platform=linux/arm/v6 --tag <tag name> .