Browse Source

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

master
Julien Cabillot 3 years ago
committed by root
parent
commit
7c28d4aea9
2 changed files with 12 additions and 4 deletions
  1. 16
      Dockerfile
  2. 0
      root/index.php

16
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/^<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

index.php → root/index.php

Loading…
Cancel
Save