-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
53 lines (38 loc) · 1.55 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
FROM php:7.4-apache AS dev
WORKDIR /var/www/html/
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/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf
RUN ln -sf /dev/stdout /var/log/apache2/access.log && \
ln -sf /dev/stderr /var/log/apache2/error.log
RUN apt-get update && apt-get install -y libmcrypt-dev \
libmagickwand-dev libpq-dev git zip unzip libxml2-dev \
libzip-dev --no-install-recommends
RUN pecl install -o -f imagick \
&& pecl install -o -f mcrypt \
&& pecl install -o -f zip \
&& pecl install -o -f xdebug
RUN docker-php-ext-enable mcrypt \
&& docker-php-ext-enable imagick \
&& docker-php-ext-enable xdebug \
&& docker-php-ext-install pdo \
&& docker-php-ext-install pdo_mysql \
&& docker-php-ext-install mysqli \
&& docker-php-ext-install zip \
&& docker-php-ext-install soap \
&& docker-php-ext-install sockets \
&& docker-php-ext-install opcache \
&& docker-php-ext-install intl \
&& docker-php-ext-install pcntl
COPY php.ini-development.txt $PHP_INI_DIR/php.ini
RUN curl -sS https://getcomposer.org/installer | \
php -- --install-dir=/usr/bin/ --filename=composer
RUN a2enmod headers rewrite negotiation
COPY . .
###
FROM php:7.4-apache AS artifact
RUN a2enmod headers
RUN rm $PHP_INI_DIR/conf.d/docker-php-ext-xdebug.ini
COPY php.ini-production.txt $PHP_INI_DIR/php.ini
COPY . .
ENTRYPOINT [ "./docker-entrypoint.sh"]