From ee6642be899e2c78f1d652fcf670dbc27ef40b95 Mon Sep 17 00:00:00 2001 From: thopic Date: Wed, 10 Nov 2021 16:25:47 +0100 Subject: [PATCH] [PHP] Add git to docker image --- apaches/Dockerfile | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/apaches/Dockerfile b/apaches/Dockerfile index a186fad..024cf97 100644 --- a/apaches/Dockerfile +++ b/apaches/Dockerfile @@ -1,11 +1,15 @@ from php:7.4.25-apache -RUN a2enmod remoteip rewrite -RUN echo "RemoteIPHeader X-Forwarded-For" > /etc/apache2/conf-available/remoteip.conf -RUN a2enconf remoteip -RUN sed -i -r 's/^ServerTokens .*/ServerTokens Prod/g' /etc/apache2/conf-available/security.conf -RUN sed -i -r 's/^ServerSignature .*/ServerSignature Off/g' /etc/apache2/conf-available/security.conf -RUN sed -i -E 's/^LogFormat "%h(.*)/LogFormat "%a\1/g' /etc/apache2/apache2.conf -RUN echo "expose_php = Off" > /usr/local/etc/php/conf.d/php_version.ini +RUN apt-get update && apt-get install -y \ + git \ + && rm -rf /var/lib/apt/lists/* + +RUN a2enmod remoteip rewrite \ + && echo "RemoteIPHeader X-Forwarded-For" > /etc/apache2/conf-available/remoteip.conf \ + && a2enconf remoteip \ + && sed -i -r 's/^ServerTokens .*/ServerTokens Prod/g' /etc/apache2/conf-available/security.conf \ + && sed -i -r 's/^ServerSignature .*/ServerSignature Off/g' /etc/apache2/conf-available/security.conf \ + && sed -i -E 's/^LogFormat "%h(.*)/LogFormat "%a\1/g' /etc/apache2/apache2.conf \ + && echo "expose_php = Off" > /usr/local/etc/php/conf.d/php_version.ini CMD ["apache2-foreground"]