-
Notifications
You must be signed in to change notification settings - Fork 24
/
Dockerfile.php7.1
50 lines (40 loc) · 1.56 KB
/
Dockerfile.php7.1
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
FROM php:7.1-apache
RUN apt-get update && apt-get install -y git-core cron \
libjpeg-dev libmcrypt-dev libpng-dev libpq-dev \
&& rm -rf /var/lib/apt/lists/* \
&& docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \
&& docker-php-ext-install gd mcrypt mysqli opcache pdo pdo_mysql zip
# Recommended opcache settings - https://secure.php.net/manual/en/opcache.installation.php
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=1'; \
} > /usr/local/etc/php/conf.d/docker-ci-opcache.ini
RUN { \
echo 'log_errors=on'; \
echo 'display_errors=off'; \
echo 'upload_max_filesize=32M'; \
echo 'post_max_size=32M'; \
echo 'memory_limit=128M'; \
echo 'date.timezone="UTC"'; \
} > /usr/local/etc/php/conf.d/docker-ci-php.ini
RUN { \
echo '<FilesMatch "^\.">'; \
echo ' Order allow,deny'; \
echo ' Deny from all'; \
echo '</FilesMatch>'; \
echo '<DirectoryMatch "^\.|\/\.">'; \
echo ' Order allow,deny'; \
echo ' Deny from all'; \
echo '</DirectoryMatch>'; \
} > /etc/apache2/conf-available/docker-ci-php.conf
RUN a2enconf docker-ci-php
RUN a2enmod rewrite
COPY --chown=www-data:www-data ./CodeIgniter_1.7.3 /usr/src/CodeIgniter_1.7.3
RUN ln -s /usr/src/CodeIgniter_1.7.3/system /var/www/codeigniter
COPY docker-entrypoint /usr/local/bin/
ENTRYPOINT ["docker-entrypoint"]
CMD ["apache2-foreground"]