From 325883ac08ef231da4ff7c7aa9d8e9fe4ea4f3ac Mon Sep 17 00:00:00 2001 From: LVoogd Date: Sun, 19 Nov 2023 17:02:31 +0100 Subject: [PATCH] Add Dockerfile --- Dockerfile | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..0acda7f --- /dev/null +++ b/Dockerfile @@ -0,0 +1,19 @@ +FROM php:8.2-apache + +RUN apt update +RUN apt install zip unzip + +RUN docker-php-ext-install pdo pdo_pgsql +ENV APACHE_DOCUMENT_ROOT=/var/www/html/public +RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf +RUN sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf +RUN a2enmod rewrite && /etc/init.d/apache2 restart + +COPY . . + +COPY --from=composer /usr/bin/composer /usr/bin/composer + +WORKDIR /var/www/html + +RUN composer install +RUN chown -R www-data:www-data /var/www/html/ \ No newline at end of file