56 lines
1.2 KiB
Docker
56 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 \
|
|
php82 \
|
|
php82-apache2 \
|
|
php82-apcu \
|
|
php82-curl \
|
|
php82-ctype \
|
|
php82-dom \
|
|
php82-exif \
|
|
php82-fileinfo \
|
|
php82-gd \
|
|
php82-gmp \
|
|
php82-iconv \
|
|
php82-intl \
|
|
php82-json \
|
|
php82-mbstring \
|
|
php82-opcache \
|
|
php82-openssl \
|
|
php82-posix \
|
|
php82-pdo \
|
|
php82-pdo_mysql \
|
|
php82-pdo_sqlite \
|
|
php82-session \
|
|
php82-simplexml \
|
|
php82-xml \
|
|
php82-zip \
|
|
php82-zlib
|
|
|
|
## Configure apache
|
|
COPY assets/php82.ini /etc/php82/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
|
|
|
|
|
|
|
|
|
|
|