on tourne sans root, menage de /var/www/html

This commit is contained in:
Julien Cabillot 2017-11-01 17:17:12 +01:00 committed by root
parent 9b852f73df
commit 7c28d4aea9
2 changed files with 12 additions and 4 deletions

View File

@ -1,6 +1,14 @@
FROM php:apache
FROM "php:apache"
COPY . /var/www/html
RUN rm -rf "/var/www/html" && \
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'
HEALTHCHECK --interval=10s \
CMD curl --fail "http://localhost" || exit 1
COPY "root" "/var/www/html"
RUN chown -R "www-data":"www-data" "/var/www/html"
USER "www-data"
HEALTHCHECK --interval="10s" \
CMD curl --fail "http://localhost:8080" || exit 1