sunders/web/Containerfile
Renovate 114797dbfe
All checks were successful
Build (and tag) Images / Build data_handler Image (push) Successful in 41s
Build (and tag) Images / Build web Image (push) Successful in 56s
chore(deps): update docker.io/library/php docker tag to v8.6.0
2026-11-19 20:20:19 +00:00

17 lines
843 B
Docker

FROM docker.io/library/php:8.6.0-apache
RUN docker-php-ext-install mysqli bcmath
# Use PHP's production defaults (no error output to clients) and hide the PHP version.
RUN cp "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" \
&& printf 'expose_php = Off\nsession.upload_progress.enabled = 0\n' > "$PHP_INI_DIR/conf.d/zz-hardening.ini"
# Disable directory listings and reduce the server signature.
RUN sed -i 's/^\(\s*Options\) Indexes FollowSymLinks/\1 FollowSymLinks/' /etc/apache2/apache2.conf \
&& sed -i -e 's/^ServerTokens .*/ServerTokens Prod/' -e 's/^ServerSignature .*/ServerSignature Off/' /etc/apache2/conf-available/security.conf
COPY ./www/* /var/www/html
# The web server must not be able to create or modify files in the document root.
RUN chown -R root:root /var/www/html \
&& chmod -R u=rwX,go=rX /var/www/html