|
|
|
FROM php:8.1-apache |
|
|
|
|
|
RUN apt-get update && apt-get install -y \ |
|
wget \ |
|
git \ |
|
gnupg \ |
|
lsb-release \ |
|
apt-transport-https \ |
|
ca-certificates \ |
|
libpq-dev \ |
|
libsqlite3-dev \ |
|
zip \ |
|
unzip \ |
|
&& docker-php-ext-install pgsql pdo_pgsql pdo_sqlite mysqli pdo_mysql |
|
|
|
|
|
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer |
|
|
|
|
|
COPY ./php/ /var/www/html |
|
|
|
|
|
COPY ./php/.env /var/www/html/.env |
|
|
|
|
|
RUN composer update --working-dir=/var/www/html --no-scripts |
|
|
|
|
|
RUN sed -i 's|/var/www/html|/var/www/html/public|' /etc/apache2/sites-available/000-default.conf |
|
|
|
|
|
RUN sed -i 's/Listen 80/Listen 7860/' /etc/apache2/ports.conf \ |
|
&& sed -i 's/:80/:7860/' /etc/apache2/sites-available/000-default.conf |
|
|
|
|
|
RUN chown -R www-data:www-data /var/www/html \ |
|
&& find /var/www/html -type d -exec chmod 755 {} \; \ |
|
&& find /var/www/html -type f -exec chmod 644 {} \; |
|
|
|
|
|
RUN mkdir -p /var/www/html/storage \ |
|
&& mkdir -p /var/www/html/bootstrap/cache \ |
|
&& chown -R www-data:www-data /var/www/html/storage \ |
|
&& chown -R www-data:www-data /var/www/html/bootstrap/cache \ |
|
&& chmod -R 775 /var/www/html/storage \ |
|
&& chmod -R 775 /var/www/html/bootstrap/cache |
|
|
|
|
|
EXPOSE 7860 |
|
|
|
|
|
CMD ["apache2-foreground"] |