-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
66 lines (57 loc) · 1.8 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
55
56
57
58
59
60
61
62
63
64
65
FROM php:7.2-fpm
MAINTAINER Mathieu LESNIAK <mathieu@lesniak.fr>
RUN DEBIAN_FRONTEND=noninteractive apt-get update -y && apt-get install -y --no-install-recommends \
nginx \
apt-utils \
locales \
wget \
curl \
git \
msmtp \
libmemcached-dev \
libxml2-dev \
libfreetype6-dev \
libicu-dev \
libmcrypt-dev \
zlib1g-dev \
libjpeg62-turbo-dev \
libpng-dev \
libxpm-dev \
libzip-dev \
libmagickwand-dev \
unzip \
&& rm -rf /var/lib/apt/lists/*
RUN pecl install mcrypt-1.0.2 memcached \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install -j$(nproc) iconv intl pdo_mysql mbstring soap gd zip xml json mysqli opcache \
&& docker-php-ext-enable mcrypt memcached
RUN { \
echo '[mail function]'; \
echo 'sendmail_path = "/usr/bin/msmtp -t"'; \
} > /usr/local/etc/php/conf.d/msmtp.ini
# opcode recommended settings
RUN { \
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'; \
echo 'opcache.enable_cli=0'; \
} > /usr/local/etc/php/conf.d/opcache-recommended.ini
# Prestashop settings
RUN { \
echo 'memory_limit=256M'; \
echo 'upload_max_filesize=128M'; \
echo 'max_input_vars=5000'; \
echo "date.timezone='Europe/Paris'"; \
} > /usr/local/etc/php/conf.d/prestashop.ini
RUN apt-get remove --purge curl -y && \
apt-get clean && \
apt-get purge && \
rm -rf /var/lib/apt/lists/*
COPY nginx-site.conf /etc/nginx/sites-enabled/default
COPY entrypoint.sh /etc/entrypoint.sh
RUN usermod -u 1000 www-data
WORKDIR /var/www/
EXPOSE 80
ENTRYPOINT ["sh", "/etc/entrypoint.sh"]