Skip to content

Commit

Permalink
how to run through docker explained
Browse files Browse the repository at this point in the history
Signed-off-by: Ahmet Turkmen <[email protected]>
  • Loading branch information
mrtrkmn committed Nov 6, 2020
1 parent a20104b commit f5b02cf
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,25 @@ $ sudo apt install wireguard
$ apt-get install wireguard-dkms wireguard-tools linux-headers-$(uname -r)
```

## How to run through Docker Container

```bash
$ docker build -t wg .

$ docker run -e CONFIG_PATH=/app/ \
--name=wireguard-service
--net=host \
--cap-add=NET_ADMIN \
--cap-add=SYS_MODULE \
-v /path/to/service/config:/app/
-v /lib/modules:/lib/modules \
--sysctl="net.ipv4.conf.all.src_valid_mark=1" \
wg
```

Docker will run only in Linux machines.`--net=host` is required because Wireguard service generates VPN endpoint ports randomly.


## Available gRPC calls

- **GenPrivateKey**
Expand Down

0 comments on commit f5b02cf

Please sign in to comment.