From 66e9a6961ebc1f74fedd3ce5f9c70a4c0cbce61b Mon Sep 17 00:00:00 2001 From: LVoogd Date: Sun, 19 Nov 2023 17:02:31 +0100 Subject: [PATCH] Add Dockerfile --- Dockerfile | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..dc6da59 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +FROM php:8.2-apache + +RUN apt update +RUN apt install zip unzip libpq-dev -y + +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/ +RUN chown -R www-data:www-data /tmp/ \ No newline at end of file