mirror of
https://github.com/cwinfo/yggdrasil-go.git
synced 2024-11-22 21:10:29 +00:00
Merge pull request #218 from cwinfo/develop
Docker Support & Updated License
This commit is contained in:
commit
9e17e41b79
1
Dockerfile
Normal file
1
Dockerfile
Normal file
@ -0,0 +1 @@
|
|||||||
|
contrib/docker/Dockerfile
|
3
LICENSE
3
LICENSE
@ -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
18
contrib/docker/Dockerfile
Normal 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" ]
|
13
contrib/docker/entrypoint.sh
Normal file
13
contrib/docker/entrypoint.sh
Normal 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 $?
|
Loading…
Reference in New Issue
Block a user