From 50fc8010b7de4f0f2bf6f1ec541881bfa7781962 Mon Sep 17 00:00:00 2001
From: Jonas Leder <jonas@jonasled.de>
Date: Mon, 16 Aug 2021 19:05:50 +0200
Subject: [PATCH] manual install apache

---
 Dockerfile       | 10 ++++++++--
 httpd-foreground |  7 +++++++
 2 files changed, 15 insertions(+), 2 deletions(-)
 create mode 100755 httpd-foreground

diff --git a/Dockerfile b/Dockerfile
index 6020980..a1410f2 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -14,14 +14,14 @@ COPY --from=buildJS /build /build
 RUN cd /build/public/API && composer install
 
 # Prepare Webserver
-FROM httpd:alpine
+FROM alpine:alpine
 
 # |--------------------------------------------------------------------------
 # | install dependencies
 # |--------------------------------------------------------------------------
 RUN apk update && \
     apk upgrade && \
-    apk add php8-apache2 php8-mysqli curl
+    apk add apache2 php8-apache2 php8-mysqli curl
 
 # |--------------------------------------------------------------------------
 # | copy website from node build
@@ -43,3 +43,9 @@ HEALTHCHECK CMD curl --fail http://localhost || exit 1
 # | expose http port
 # |--------------------------------------------------------------------------
 EXPOSE 80
+
+# |--------------------------------------------------------------------------
+# | set entrypoint
+# |--------------------------------------------------------------------------
+COPY httpd-foreground /usr/local/bin/
+CMD ["httpd-foreground"]
\ No newline at end of file
diff --git a/httpd-foreground b/httpd-foreground
new file mode 100755
index 0000000..e896168
--- /dev/null
+++ b/httpd-foreground
@@ -0,0 +1,7 @@
+#!/bin/sh
+set -e
+
+# Apache gets grumpy about PID files pre-existing
+rm -f /usr/local/apache2/logs/httpd.pid
+
+exec httpd -DFOREGROUND "$@"
-- 
GitLab