use custom apache image
This commit is contained in:
parent
7afbad6c04
commit
9d72bfee4a
2 changed files with 3 additions and 35 deletions
31
Dockerfile
31
Dockerfile
|
@ -14,40 +14,15 @@ COPY --from=buildJS /build /build
|
|||
RUN cd /build/public/API && composer install
|
||||
|
||||
# Prepare Webserver
|
||||
FROM alpine:latest
|
||||
FROM gitlab.jonasled.de/jonasled/apache-php-minimal:latest
|
||||
|
||||
# |--------------------------------------------------------------------------
|
||||
# | install dependencies
|
||||
# |--------------------------------------------------------------------------
|
||||
RUN apk update && \
|
||||
apk upgrade && \
|
||||
apk add apache2 php8-apache2 php8-mysqli php8-mbstring curl && \
|
||||
rm /var/www/localhost/htdocs/ -R
|
||||
apk add php8-mysqli php8-mbstring curl
|
||||
|
||||
# |--------------------------------------------------------------------------
|
||||
# | copy website from node build
|
||||
# |--------------------------------------------------------------------------
|
||||
COPY --from=composer /build/public /var/www/localhost/htdocs/
|
||||
|
||||
# |--------------------------------------------------------------------------
|
||||
# | enable apache modules
|
||||
# |--------------------------------------------------------------------------
|
||||
RUN sed -i '/LoadModule rewrite_module/s/^#//g' /etc/apache2/httpd.conf && \
|
||||
sed -i 's#AllowOverride [Nn]one#AllowOverride All#' /etc/apache2/httpd.conf
|
||||
|
||||
# |--------------------------------------------------------------------------
|
||||
# | enable healthcheck
|
||||
# |--------------------------------------------------------------------------
|
||||
HEALTHCHECK CMD curl --fail http://localhost || exit 1
|
||||
|
||||
# |--------------------------------------------------------------------------
|
||||
# | expose http port
|
||||
# |--------------------------------------------------------------------------
|
||||
EXPOSE 80
|
||||
|
||||
# |--------------------------------------------------------------------------
|
||||
# | set entrypoint
|
||||
# |--------------------------------------------------------------------------
|
||||
COPY httpd-foreground /usr/local/bin/
|
||||
RUN chmod +x /usr/local/bin/httpd-foreground
|
||||
CMD ["httpd-foreground"]
|
||||
COPY --from=composer /build/public /var/www/localhost/htdocs/
|
|
@ -1,7 +0,0 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
# Apache gets grumpy about PID files pre-existing
|
||||
rm -f /usr/local/apache2/logs/httpd.pid
|
||||
|
||||
exec httpd -DFOREGROUND "$@"
|
Loading…
Add table
Reference in a new issue