From 8b7b3452cf6d6e480d87896de5520986fde8d272 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christer=20War=C3=A9n?= Date: Mon, 3 Dec 2018 05:57:00 +0200 Subject: [PATCH] Creating Dockerfile to /contrib/docker/ - Multiple architectures supported by using Golang's official Debian Stretch image. - Upgrading os to latest updates - Adding all files to image - Creating user for yggdrasil (kinda unused) - Building from source code --- contrib/docker/Dockerfile | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 contrib/docker/Dockerfile diff --git a/contrib/docker/Dockerfile b/contrib/docker/Dockerfile new file mode 100644 index 0000000..a5174eb --- /dev/null +++ b/contrib/docker/Dockerfile @@ -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" ]