5
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2024-11-10 06:20:26 +00:00

Merge pull request #218 from cwinfo/develop

Docker Support & Updated License
This commit is contained in:
Arceliar 2018-12-03 18:06:46 -06:00 committed by GitHub
commit 9e17e41b79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 33 additions and 2 deletions

1
Dockerfile Normal file
View File

@ -0,0 +1 @@
contrib/docker/Dockerfile

View File

@ -17,11 +17,10 @@ statement from your version. This exception does not (and cannot) modify any
license terms which apply to the Application, with which you must still license terms which apply to the Application, with which you must still
comply. comply.
GNU LESSER GENERAL PUBLIC LICENSE GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007 Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed. of this license document, but changing it is not allowed.

18
contrib/docker/Dockerfile Normal file
View File

@ -0,0 +1,18 @@
FROM golang:stretch
MAINTAINER Christer Waren/CWINFO "christer.waren@cwinfo.org"
RUN apt-get update \
&& apt-get upgrade -y
ADD . /src
WORKDIR /src
RUN adduser --system --home /etc/yggdrasil-network --uid 1000 yggdrasil-network \
&& rm -rf build_* && ./build \
&& cp yggdrasil /usr/bin \
&& cp contrib/docker/entrypoint.sh /
VOLUME [ "/etc/yggdrasil-network" ]
ENTRYPOINT [ "/entrypoint.sh" ]

View File

@ -0,0 +1,13 @@
#!/usr/bin/env bash
set -e
CONF_DIR="/etc/yggdrasil-network"
if [ ! -f "$CONF_DIR/config.conf" ]; then
echo "generate $CONF_DIR/config.conf"
yggdrasil --genconf > "$CONF_DIR/config.conf"
fi
yggdrasil --useconf < "$CONF_DIR/config.conf"
exit $?