One single RUN instead of multiple RUNs

This commit is contained in:
ex0nuss committed 2021-01-04 14:13:25 +01:00
1 parent 88b0d36ca0
commit a84c61d02f
1 file changed
+4 -7
+4 -7
View File
@@ -5,7 +5,6 @@ MAINTAINER ex0nuss
ENV DEBIAN_FRONTEND noninteractive ENV DEBIAN_FRONTEND noninteractive
ENV DEBCONF_NONINTERACTIVE_SEEN true ENV DEBCONF_NONINTERACTIVE_SEEN true
#--no-install-recommends
RUN apt-get -y update && \ RUN apt-get -y update && \
apt install -y \ apt install -y \
apache2 \ apache2 \
@@ -24,16 +23,14 @@ RUN git clone https://github.com/sciguy14/Remote-Wake-Sleep-On-LAN-Server.git &&
COPY ports.conf /etc/apache2/ COPY ports.conf /etc/apache2/
RUN a2enmod headers &&\ RUN a2enmod headers &&\
service apache2 restart service apache2 restart &&\
mv -f Remote-Wake-Sleep-On-LAN-Server/000-default.conf /etc/apache2/sites-available/000-default.conf &&\
RUN mv -f Remote-Wake-Sleep-On-LAN-Server/000-default.conf /etc/apache2/sites-available/000-default.conf &&\
sed -i.bak "s/expose_php = On/expose_php = Off/g" /etc/php/7.4/apache2/php.ini &&\ sed -i.bak "s/expose_php = On/expose_php = Off/g" /etc/php/7.4/apache2/php.ini &&\
sed -i.bak "s/E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED/error_reporting = E_ERROR/g" /etc/php/7.4/apache2/php.ini &&\ sed -i.bak "s/E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED/error_reporting = E_ERROR/g" /etc/php/7.4/apache2/php.ini &&\
sed -i.bak "s/ServerSignature On/ServerSignature Off/g" /etc/apache2/conf-available/security.conf &&\ sed -i.bak "s/ServerSignature On/ServerSignature Off/g" /etc/apache2/conf-available/security.conf &&\
sed -i.bak "s/ServerTokens OS/ServerTokens Prod/g" /etc/apache2/conf-available/security.conf &&\ sed -i.bak "s/ServerTokens OS/ServerTokens Prod/g" /etc/apache2/conf-available/security.conf &&\
service apache2 restart service apache2 restart &&\
mv Remote-Wake-Sleep-On-LAN-Server/* /var/www/html &&\
RUN mv Remote-Wake-Sleep-On-LAN-Server/* /var/www/html &&\
mv Remote-Wake-Sleep-On-LAN-Server/.htaccess /var/www/html &&\ mv Remote-Wake-Sleep-On-LAN-Server/.htaccess /var/www/html &&\
rm -rf Remote-Wake-Sleep-On-LAN-Server/ &&\ rm -rf Remote-Wake-Sleep-On-LAN-Server/ &&\
rm -f /var/www/html/index.html rm -f /var/www/html/index.html