From 7c28d4aea9d0767fda5e508526e2d812a091ea3f Mon Sep 17 00:00:00 2001 From: Julien Cabillot Date: Wed, 1 Nov 2017 17:17:12 +0100 Subject: [PATCH] on tourne sans root, menage de /var/www/html --- Dockerfile | 16 ++++++++++++---- index.php => root/index.php | 0 2 files changed, 12 insertions(+), 4 deletions(-) rename index.php => root/index.php (100%) diff --git a/Dockerfile b/Dockerfile index 5f85e24..3693bab 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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/^$//' '/etc/apache2/sites-enabled/000-default.conf' -HEALTHCHECK --interval=10s \ - CMD curl --fail "http://localhost" || exit 1 \ No newline at end of file +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 diff --git a/index.php b/root/index.php similarity index 100% rename from index.php rename to root/index.php