diff --git a/docker/.dockerignore b/docker/.dockerignore new file mode 100644 index 000000000..6231b785a --- /dev/null +++ b/docker/.dockerignore @@ -0,0 +1,11 @@ +**/*.md +docs/** +includes/settings.php +LICENSE +Makefile +node?modules/** +TODO + +!docs/newwin.gif +!docs/WebCalendar-SysAdmin.html +!GPL.html diff --git a/docker/Dockerfile-php8 b/docker/Dockerfile-php8 index 2d60da79d..7773a1f90 100644 --- a/docker/Dockerfile-php8 +++ b/docker/Dockerfile-php8 @@ -1,28 +1,45 @@ +#escape=` +# To run on Windows, where \ is the path separator. + FROM php:8.0-apache -MAINTAINER craigk5n +# MAINTAINER deprecated in favor of LABEL. +LABEL craigk5n LABEL vendor "k5n.us" RUN docker-php-ext-install mysqli -# Copy only the files included in a release rather than all files +# Copy only the files included in a release rather than all files. +RUN mkdir -p /var/www/html/images ` + /var/www/html/includes ` + /var/www/html/install ` + /var/www/html/pub ` + /var/www/html/themes ` + /var/www/html/tools ` + /var/www/html/translations ` +# Don't we need these, too? + /var/www/html/docs ` + /var/www/html/wc-icons -RUN mkdir -p /var/www/html/images \ - /var/www/html/pub \ - /var/www/html/tools \ - /var/www/html/translations \ - /var/www/html/install \ - /var/www/html/themes -COPY images /var/www/html/images/ COPY includes /var/www/html/includes/ -# In case there was a copy in the local dev setup, remove any -# existing settings.php. + +# In case there was a copy in the local dev setup, +# remove any existing settings.php. RUN rm -f /var/www/html/includes/settings.php +# WARNING: May be a security issue! +# Better to use .dockerignore and never copy settings.php in at all. + RUN touch /var/www/html/includes/settings.php -run chmod 777 /var/www/html/includes/settings.php +RUN chmod 777 /var/www/html/includes/settings.php + +COPY [a-z]*php favicon.ico GPL.html /var/www/html/ +# Need AUTHORS, too, or about.php won't work. +COPY AUTHORS /var/www/html/ + +COPY docs /var/www/html/docs/ +COPY images /var/www/html/images/ COPY install /var/www/html/install/ COPY pub /var/www/html/pub/ -COPY tools /var/www/html/tools/ COPY themes /var/www/html/themes/ +COPY tools /var/www/html/tools/ COPY translations /var/www/html/translations/ -COPY [a-z]*php favicon.ico GPL.html /var/www/html/ -COPY docs/WebCalendar-SysAdmin.html docs/newwin.gif /var/www/html/docs/ +COPY wc-icons /var/www/html/wc-icons/