2022-05-18 21:01:19 +02:00
|
|
|
FROM php:8-apache
|
|
|
|
|
|
|
|
# Install OS dependencies required
|
|
|
|
RUN apt-get update && apt-get upgrade -y && apt-get install git unzip zlib1g-dev libpng-dev -y
|
|
|
|
|
|
|
|
# Adapt apache config
|
|
|
|
RUN a2enmod rewrite \
|
|
|
|
&& echo "ServerName 127.0.0.1" >> /etc/apache2/apache2.conf
|
|
|
|
|
|
|
|
# Install PHP ext-gd
|
|
|
|
RUN docker-php-ext-install gd
|
|
|
|
|
2022-05-18 22:04:02 +02:00
|
|
|
WORKDIR /var/www/html
|
|
|
|
COPY . .
|
2022-05-18 21:01:19 +02:00
|
|
|
|
2022-05-18 23:48:31 +02:00
|
|
|
RUN chmod +x /var/www/html/docker-utils/install-composer && \
|
|
|
|
/var/www/html/docker-utils/install-composer && \
|
2022-05-18 21:01:19 +02:00
|
|
|
./composer.phar update && \
|
2022-05-18 23:48:31 +02:00
|
|
|
chmod +x /var/www/html/docker-utils/init-server
|
2022-05-18 21:01:19 +02:00
|
|
|
|
2022-05-18 23:58:03 +02:00
|
|
|
VOLUME /var/www/html/settings
|
|
|
|
|
2022-05-18 21:01:19 +02:00
|
|
|
# Run the server
|
2022-05-18 23:48:31 +02:00
|
|
|
CMD ["/var/www/html/docker-utils/init-server"]
|