Browse Source

Merge pull request #65 from tony1661/patch-8

Build docker image with github code
pull/78/head
Per-Arne Andersen 4 years ago
committed by GitHub
parent
commit
5491a2bf0b
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      README.md
  2. 59
      docs/install_docker_github.md

5
README.md

@ -23,7 +23,7 @@ The features of wg-manager includes:
* Create and manage API-Keys
# Dependencies
* Linux >= 5.6 *(Alternatively: wireguard-dkms)*
* Linux Kernel >= 5.6 *(Alternatively: wireguard-dkms)*
# Common Installation Steps
1. Enable ip forwarding:
@ -69,8 +69,9 @@ services:
WEB_CONCURRENCY: 1
```
or [plain docker here](./docs/guides/docker_configuration.md)
or [build docker image from github](./docs/install_docker_github.md)
# Method #2: Bare Metal
## Method #2: Bare Metal
- [Installation on Debian/Ubuntu/RPI4](./docs/install.md)
# Using the development branch

59
docs/install_docker_github.md

@ -0,0 +1,59 @@
# Build Docker Image from Github Repo
The steps below will walk you through installing the application in a docker container from the latest github version.
---
First thing we need to do is clone the github repository
```bash
git clone https://github.com/perara/wg-manager.git
```
Next we need to build the image. This will take some time.
```bash
docker build -t wg-manager .
```
Now that our image is built, we can either launch the container via _docker-compose_ or through the _docker CLI_.
## Docker Compose
```yaml
version: "2.1"
services:
wireguard:
container_name: wg-manager
image: wg-manager
restart: always
sysctls:
net.ipv6.conf.all.disable_ipv6: 0 # Required for IPV6
cap_add:
- NET_ADMIN
network_mode: host
ports:
- 51802:51802/udp
- 8888:8888
volumes:
- ./wg-manager:/config
environment:
HOST: 0.0.0.0
PORT: 8888
ADMIN_USERNAME: admin
ADMIN_PASSWORD: admin
WEB_CONCURRENCY: 1
```
## Docker CLI
```bash
docker run -d \
--sysctl net.ipv6.conf.all.disable_ipv6=0 \
--cap-add NET_ADMIN \
--name wg-manager \
--net host \
-p "51802:51802/udp" \
-p "8888:8888" \
-v wg-manager:/config \
-e HOST="0.0.0.0" \
-e PORT="8888" \
-e ADMIN_USERNAME="admin" \
-e ADMIN_PASSWORD="admin" \
wg-manager
```
Loading…
Cancel
Save