Initial commit

This commit is contained in:
Thomas Klaehn 2021-06-10 05:53:47 +02:00
commit 55c0664e0d
4 changed files with 41 additions and 0 deletions

10
Dockerfile Normal file
View File

@ -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"]

8
default.conf Normal file
View File

@ -0,0 +1,8 @@
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/html;
index index.html;
}

9
index.html Normal file
View File

@ -0,0 +1,9 @@
<html>
<head>
<title>Welcome to tkl!</title>
</head>
<body>
<h1>Success! The tkl server block is working!</h1>
</body>
</html>

14
run.sh Executable file
View File

@ -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