55 lines
1.2 KiB
Docker
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 \
|
|
php81 \
|
|
php81-apache2 \
|
|
php81-apcu \
|
|
php81-curl \
|
|
php81-ctype \
|
|
php81-dom \
|
|
php81-exif \
|
|
php81-fileinfo \
|
|
php81-gd \
|
|
php81-gmp \
|
|
php81-iconv \
|
|
php81-json \
|
|
php81-mbstring \
|
|
php81-opcache \
|
|
php81-openssl \
|
|
php81-posix \
|
|
php81-pdo \
|
|
php81-pdo_mysql \
|
|
php81-pdo_sqlite \
|
|
php81-session \
|
|
php81-simplexml \
|
|
php81-xml \
|
|
php81-zip \
|
|
php81-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
|
|
|
|
|
|
|
|
|
|
|