Uniformisation avec les autres dockers ubuntu

This commit is contained in:
Cabillot Julien 2018-05-18 12:08:29 -04:00
parent 06e4222743
commit 146979c0f3

View File

@ -1,7 +1,9 @@
FROM "php:7.1-apache"
MAINTAINER "Julien Cabillot <dockerimages@cabillot.eu>"
RUN sed -i'' 's/ServerSignature On/ServerSignature Off/; s/ServerTokens OS/ServerTokens Prod/' "/etc/apache2/conf-enabled/security.conf" && \
RUN export DEBIAN_FRONTEND="noninteractive" && \
sed -i'' 's/ServerSignature On/ServerSignature Off/; s/ServerTokens OS/ServerTokens Prod/' "/etc/apache2/conf-enabled/security.conf" && \
sed -i'' 's/^Listen 80$/Listen 8080/' "/etc/apache2/ports.conf" && \
sed -i'' 's/^<VirtualHost \*:80>$/<VirtualHost *:8080>/' '/etc/apache2/sites-enabled/000-default.conf' && \
echo "RemoteIPHeader X-Forwarded-For\nRemoteIPProxiesHeader X-Forwarded-By" > "${APACHE_CONFDIR}/conf-available/remoteip.conf" && \
@ -10,14 +12,14 @@ RUN sed -i'' 's/ServerSignature On/ServerSignature Off/; s/ServerTokens OS/Serve
a2enmod remoteip headers rewrite && \
apt-get -qq --yes autoremove --purge && \
apt-get -qq --yes clean all && \
rm -rf "/usr/share/doc/*" \
"/var/cache/*" \
"/var/lib/apt/lists/*" \
"/usr/src/*" \
"/var/cache/*" \
"/var/log/"{apt/*,dpkg.log} \
"/var/www/html" \
"/tmp/*" && \
rm -rf "/usr/share/doc/"* \
"/var/cache/"* \
"/var/lib/apt/lists/"* \
"/usr/src/"* \
"/var/cache/"* \
"/var/log/"{apt/*,dpkg.log} \
"/var/www/html" \
"/tmp/"* && \
install --directory --group="www-data" --owner="www-data" --mode="2770" "/var/www/html" && \
# On active les logs sur stderr (apache + php)
sed -ri 's#^(\s*ErrorLog)\s+\S+#\1 /proc/self/fd/2#g;' "/etc/apache2/apache2.conf" && \