-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPHP.Dockerfile
More file actions
47 lines (37 loc) · 1002 Bytes
/
PHP.Dockerfile
File metadata and controls
47 lines (37 loc) · 1002 Bytes
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
FROM php:fpm
RUN apt-get update
RUN apt-get install -y --no-install-recommends \
libfreetype6-dev \
libicu-dev \
libjpeg-dev \
libmagickwand-dev \
libpng-dev \
libwebp-dev \
libzip-dev
RUN docker-php-ext-install -j "$(nproc)" \
pdo \
pdo_mysql \
mysqli \
bcmath \
exif \
gd \
intl \
zip
RUN docker-php-ext-configure gd \
--with-freetype \
--with-jpeg \
--with-webp
RUN set -eux; \
docker-php-ext-enable opcache; \
{ \
echo 'opcache.memory_consumption=128'; \
echo 'opcache.interned_strings_buffer=8'; \
echo 'opcache.max_accelerated_files=4000'; \
echo 'opcache.revalidate_freq=2'; \
echo 'opcache.fast_shutdown=1'; \
} > /usr/local/etc/php/conf.d/opcache-recommended.ini
RUN pecl install xdebug && docker-php-ext-enable xdebug
RUN pecl install imagick-3.7.0 && docker-php-ext-enable imagick
RUN adduser akhilkamath
USER akhilkamath
CMD ["php-fpm"]