Archived
1
0
Fork 0
This repository has been archived on 2024-01-27. You can view files and clone it, but cannot push or open issues or pull requests.
dockerfiles/aap/Dockerfile
J. Elfring 2f8186fe24 AAP: Fix PHP config
Pause older image builds
2022-10-25 20:51:08 +02:00

55 lines
1.2 KiB
Docker

FROM alpine:latest
LABEL maintainer "J. Elfring <code@elfring.ms>"
## Install prereqs
RUN apk add --update --no-cache \
curl \
git \
mc \
php8 \
php8-apache2 \
php8-apcu \
php8-curl \
php8-ctype \
php8-dom \
php8-exif \
php8-fileinfo \
php8-gd \
php8-gmp \
php8-iconv \
php8-json \
php8-mbstring \
php8-opcache \
php8-openssl \
php8-posix \
php8-pdo \
php8-pdo_mysql \
php8-pdo_sqlite \
php8-session \
php8-simplexml \
php8-xml \
php8-zip \
php8-zlib
## Configure apache
COPY assets/php8.ini /etc/php8/php.ini
COPY assets/httpd.conf /etc/apache2/httpd.conf
RUN chown apache:apache /run/apache2
## Some customization for running websites
RUN chown -R apache:apache /var/www/localhost\
&& sed -i 's+apache:x:100:101:apache:/var/www:/sbin/nologin+apache:x:100:101:apache:/var/www/localhost:/sbin/nologin+' /etc/passwd
USER apache
ENV SERVERADMINMAIL=webmaster@example.com
VOLUME /var/www/localhost
EXPOSE 8080
WORKDIR /var/www/localhost
CMD httpd -D FOREGROUND