manual install apache

This commit is contained in:
Jonas Leder 2021-08-16 19:05:50 +02:00
parent e31b7b3e60
commit 50fc8010b7
2 changed files with 15 additions and 2 deletions

View file

@ -14,14 +14,14 @@ COPY --from=buildJS /build /build
RUN cd /build/public/API && composer install RUN cd /build/public/API && composer install
# Prepare Webserver # Prepare Webserver
FROM httpd:alpine FROM alpine:alpine
# |-------------------------------------------------------------------------- # |--------------------------------------------------------------------------
# | install dependencies # | install dependencies
# |-------------------------------------------------------------------------- # |--------------------------------------------------------------------------
RUN apk update && \ RUN apk update && \
apk upgrade && \ apk upgrade && \
apk add php8-apache2 php8-mysqli curl apk add apache2 php8-apache2 php8-mysqli curl
# |-------------------------------------------------------------------------- # |--------------------------------------------------------------------------
# | copy website from node build # | copy website from node build
@ -43,3 +43,9 @@ HEALTHCHECK CMD curl --fail http://localhost || exit 1
# | expose http port # | expose http port
# |-------------------------------------------------------------------------- # |--------------------------------------------------------------------------
EXPOSE 80 EXPOSE 80
# |--------------------------------------------------------------------------
# | set entrypoint
# |--------------------------------------------------------------------------
COPY httpd-foreground /usr/local/bin/
CMD ["httpd-foreground"]

7
httpd-foreground Executable file
View file

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