The following has no effect;
# Dockerfile
FROM php:7-apache
RUN apt-get update && \
apt-get install -y libxml2-dev && \
docker-php-ext-install soap
RUN docker-php-ext-install mysqli
# Enable apache mods.
RUN a2enmod php7.0
RUN a2enmod rewrite
RUN a2enmod headers
i.e. the mod_headers
module fails to load?
Do you know a way how to install the mod_headers
module within Dockerfile
?
I tried;
CMD ["/usr/sbin/apache2", "-D", "FOREGROUND"]
but then the container wouldn't start.
Best Answer
Add this to your Dockerfile:
That code will enable mod_rewrite and mod_headers.