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