From 01e97a283982502f1597b3c5cc09b038ea4225db Mon Sep 17 00:00:00 2001 From: TiynGER <43725244+TiynGER@users.noreply.github.com> Date: Sat, 31 Aug 2019 22:33:38 +0200 Subject: [PATCH] 1.0.0 Addition --- Dockerfile | 19 +++++++++++++++++++ README.md | 16 ++++++++++++++++ VERSION.txt | 1 + run.sh | 7 +++++++ 4 files changed, 43 insertions(+) create mode 100644 Dockerfile create mode 100644 README.md create mode 100644 VERSION.txt create mode 100644 run.sh diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..2817375 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,19 @@ +FROM ubuntu + +MAINTAINER mail@martenkante.de + +ENV SERVER_NAME localhost + +RUN apt-get update + +RUN apt-get install pygopherd -y + +ADD run.sh / + +RUN chmod +x run.sh + +VOLUME /var/gopher + +EXPOSE 70 + +CMD ["./run.sh"] diff --git a/README.md b/README.md new file mode 100644 index 0000000..a89e748 --- /dev/null +++ b/README.md @@ -0,0 +1,16 @@ +#DockerGopherServer + +This is a dockerized version of a gopher server. + +##Environment-variables + +Set the following variables with the -e tag. + +| Name | Usage | Default | +| ------------- | ----- | ------- | +| SERVER_NAME | set this to your IP/DOMAIN (no "gopher://" needed!) | localhost | + +##example build/run-command + +``` docker build -t gopherserver . ``` +``` docker run -d -v gophermartenkante:/var/gopher -p 70:70 --restart unless-stopped -e SERVER_NAME='martenkante.de' --name gophermartenkante gopherserver ``` \ No newline at end of file diff --git a/VERSION.txt b/VERSION.txt new file mode 100644 index 0000000..afaf360 --- /dev/null +++ b/VERSION.txt @@ -0,0 +1 @@ +1.0.0 \ No newline at end of file diff --git a/run.sh b/run.sh new file mode 100644 index 0000000..629a3db --- /dev/null +++ b/run.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +sed -i '30i servername='$SERVER_NAME /etc/pygopherd/pygopherd.conf + +/etc/init.d/pygopherd start + +while true; do sleep 1000; done