-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.sugar-php
More file actions
77 lines (65 loc) · 2.57 KB
/
Dockerfile.sugar-php
File metadata and controls
77 lines (65 loc) · 2.57 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
FROM php:7.4.21-apache
LABEL maintainer="PHP4 LAMP Running Env <[email protected]>"
RUN apt-get update
RUN apt-get install -y g++ \
openssl \
libc-client2007e-dev \
libkrb5-dev \
libxml2-dev \
libfreetype6-dev \
libgd-dev \
libldap2-dev \
libsasl2-dev \
libmcrypt-dev \
libzip-dev \
libcurl4-openssl-dev \
libgmp-dev \
zlib1g-dev \
libonig-dev \
libpng-dev && \
ln -fs /usr/lib/x86_64-linux-gnu/libldap.so /usr/lib/
RUN docker-php-ext-configure imap --with-kerberos --with-imap-ssl && \
docker-php-ext-configure gd && \
docker-php-ext-configure bcmath && \
docker-php-ext-configure ldap --with-ldap-sasl --with-ldap
RUN docker-php-ext-install imap gd exif dom gettext mbstring soap zip bcmath ldap gmp mysqli sockets
RUN pecl install mcrypt-1.0.4
RUN docker-php-ext-enable mcrypt
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \
php composer-setup.php --quiet --install-dir="/usr/local/bin/" --filename="composer" && \
rm composer-setup.php
# configure php
RUN printf "error_reporting = E_ERROR \n\
phar.readonly = false \n\
display_errors = On \n\
log_errors = Off \n\
memory_limit = 512M \n\
default_socket_timeout=300 \n\
upload_max_filesize = 8M \n\
date.timezone='America/Los_Angeles' \n" > /usr/local/etc/php/conf.d/setting.ini
RUN printf "<Directory /var/www/html> \n\
Options Indexes FollowSymLinks\n\
AllowOverride All\n\
Order allow,deny\n\
Allow from all\n\
Require all granted\n\
</Directory>\n" > /etc/apache2/conf-available/rewrite-enable.conf
RUN ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/rewrite.load
RUN pecl install xdebug
RUN docker-php-ext-enable xdebug
RUN printf "xdebug.mode=debug \n\
xdebug.start_with_request = yes \n" > /usr/local/etc/php/conf.d/xdebug-setting.ini
RUN pecl install redis
RUN docker-php-ext-enable redis
RUN docker-php-ext-install pdo pdo_mysql
RUN docker-php-ext-install opcache
RUN printf "[opcache] \n\
opcache.enable=1 \n\
opcache.revalidate_freq=60 \n\
opcache.validate_timestamps=1 \n\
opcache.max_accelerated_files=10000 \n\
opcache.memory_consumption=128 \n\
opcache.max_wasted_percentage=10 \n\
opcache.interned_strings_buffer=16 \n\
opcache.fast_shutdown=1 \n" > /usr/local/etc/php/conf.d/opcache.ini
CMD ["apache2-foreground"]