This repository has been archived by the owner on Jun 22, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
54 lines (39 loc) · 1.47 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
54
FROM php:7.4-apache as production
LABEL maintainer="honza@getrector.org"
WORKDIR /var/www/rector-ci.org
# Install php extensions + cleanup
RUN apt-get update && apt-get install -y \
git \
unzip \
g++ \
zlib1g-dev \
libicu-dev \
libzip-dev \
&& docker-php-ext-configure intl \
&& docker-php-ext-install intl \
&& pecl -q install \
zip \
&& docker-php-ext-enable zip \
&& apt-get clean \
&& rm -rf /tmp/* /usr/local/lib/php/doc/* /var/cache/apt/*
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
ENV COMPOSER_ALLOW_SUPERUSER 1
COPY ./.docker/apache/apache.conf /etc/apache2/sites-available/000-default.conf
# TODO: performance optimizations https://symfony.com/doc/current/performance.html
# TODO: Run "composer dump-env prod" to compile .env files for production use (requires symfony/flex >=1.2).
# COPY composer.json composer.lock ./
# RUN composer install --prefer-dist --no-scripts --no-autoloader --no-progress --no-suggest \
# && composer clear-cache
# COPY . .
# RUN mkdir -p ./var/cache \
# ./var/log \
# && composer dump-autoload -o \
# && chown -R www-data ./var
## Local build with xdebug
FROM production as dev
COPY ./.docker/php/xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
## Install Xdebug extension + cleanup
#RUN pecl -q install xdebug \
# && docker-php-ext-enable xdebug \
# && apt-get clean \
# && rm -rf /tmp/* /usr/local/lib/php/doc/* /var/cache/apt/*