From 55c0664e0df170d0a001733781096efc7733ac70 Mon Sep 17 00:00:00 2001 From: Thomas Klaehn Date: Thu, 10 Jun 2021 05:53:47 +0200 Subject: [PATCH] Initial commit --- Dockerfile | 10 ++++++++++ default.conf | 8 ++++++++ index.html | 9 +++++++++ run.sh | 14 ++++++++++++++ 4 files changed, 41 insertions(+) create mode 100644 Dockerfile create mode 100644 default.conf create mode 100644 index.html create mode 100755 run.sh diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..db0608b --- /dev/null +++ b/Dockerfile @@ -0,0 +1,10 @@ +FROM alpine:latest +RUN apk update && apk upgrade +RUN apk add --update --no-cache python3 nginx certbot +RUN mkdir -p /run/nginx +RUN mkdir -p /var/www/html +COPY default.conf /etc/nginx/http.d/ +COPY index.html /var/www/html/ +COPY run.sh /bin/ +ENTRYPOINT ["/bin/run.sh"] + diff --git a/default.conf b/default.conf new file mode 100644 index 0000000..5e92d49 --- /dev/null +++ b/default.conf @@ -0,0 +1,8 @@ +server { + listen 80 default_server; + listen [::]:80 default_server; + + root /var/www/html; + index index.html; + +} diff --git a/index.html b/index.html new file mode 100644 index 0000000..a8081f2 --- /dev/null +++ b/index.html @@ -0,0 +1,9 @@ + + + Welcome to tkl! + + +

Success! The tkl server block is working!

+ + + diff --git a/run.sh b/run.sh new file mode 100755 index 0000000..08af9d6 --- /dev/null +++ b/run.sh @@ -0,0 +1,14 @@ +#!/bin/sh +nginx + + +# if argument(s) given - execute argument(s) in container. Otherwise loop. +if [ "$#" -gt 0 ]; then + exec $@ +else + while :; + do + sleep 1 + done +fi +