-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
60 lines (41 loc) · 1.58 KB
/
Dockerfile
File metadata and controls
60 lines (41 loc) · 1.58 KB
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
55
56
57
58
59
60
FROM php:7.2-fpm
MAINTAINER KENDRICK/MEDIA.figaro <media.figaro@gmail.com>
LABEL DESCRIPTION "PHP7-FPM Docker container optimized for Symfony with OPcache and graphic library"
LABEL version="1.0"
RUN apt-get update && apt-get install -y \
git \
unzip \
# GD dependencies
libfreetype6-dev \
libjpeg62-turbo-dev \
# webp
libvpx-dev \
# Type docker-php-ext-install to see available extensions
&& docker-php-ext-install pdo_mysql opcache \
# GD configure
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ --with-png-dir=/usr/include/ --with-vpx-dir=/usr/include/ \
&& docker-php-ext-install gd
# intl
RUN apt-get update \
&& apt-get install -y libicu-dev \
&& docker-php-ext-configure intl \
&& docker-php-ext-install intl
# opcache
RUN { \
echo 'opcache.memory_consumption=128'; \
echo 'opcache.interned_strings_buffer=8'; \
echo 'opcache.max_accelerated_files=4000'; \
echo 'opcache.revalidate_freq=60'; \
echo 'opcache.fast_shutdown=1'; \
echo 'opcache.enable_cli=1'; \
} > /usr/local/etc/php/conf.d/opcache-recommended.ini
RUN echo "realpath_cache_size = 4096k; realpath_cache_ttl = 7200;" > /usr/local/etc/php/conf.d/php.ini
# composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer && \
composer --version
# timezone
RUN rm /etc/localtime && \
ln -s /usr/share/zoneinfo/Europe/Paris /etc/localtime && \
"date"
RUN echo 'alias sf2="php app/console"' >> ~/.bashrc
RUN echo 'alias sf="php bin/console"' >> ~/.bashrc