forked from webgriffe/docker-php-apache-base
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
108 lines (83 loc) · 2.79 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
FROM php:7.3-apache
MAINTAINER Webgriffe Srl <[email protected]>
# Install GD
RUN apt-get update && apt-get install -y apt-utils \
&& apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng-dev \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install gd \
&& apt-get autoremove -y \
&& apt-get clean
# Install Intl
RUN apt-get update \
&& apt-get install -y libicu-dev \
&& docker-php-ext-install intl \
&& apt-get clean
# Install XDEBUG
ENV XDEBUG_ENABLE 0
RUN pecl config-set preferred_state beta \
&& pecl install -o -f xdebug \
&& rm -rf /tmp/pear \
&& pecl config-set preferred_state stable
COPY ./99-xdebug.ini.disabled /usr/local/etc/php/conf.d/
# Install Memprof
ENV MEMPROF_ENABLE 0
RUN pecl config-set preferred_state beta \
&& apt-get install -y libjudy-dev \
&& pecl install -o -f memprof \
&& rm -rf /tmp/pear \
&& pecl config-set preferred_state stable
# Install Mysql
RUN docker-php-ext-install mysqli pdo_mysql
# Install Composer
RUN curl -sS https://getcomposer.org/installer | php \
&& mv composer.phar /usr/local/bin/composer
# Install mbstring
RUN docker-php-ext-install mbstring
# Install soap
RUN apt-get update \
&& apt-get install -y libxml2-dev \
&& docker-php-ext-install soap \
&& apt-get clean
# Install opcache
RUN docker-php-ext-install opcache
# Install PHP zip extension
RUN apt-get install -y libzip-dev \
&& docker-php-ext-configure zip --with-libzip \
&& docker-php-ext-install zip
# Install Git
RUN apt-get update \
&& apt-get install -y git \
&& apt-get clean
# Install xsl
RUN apt-get update \
&& apt-get install -y libxslt-dev \
&& docker-php-ext-install xsl \
&& apt-get clean
# Define PHP_TIMEZONE env variable
ENV PHP_TIMEZONE Europe/Rome
# Configure Apache Document Root
ENV APACHE_DOC_ROOT /var/www/html
# Enable Apache mod_rewrite
RUN a2enmod rewrite
# Enable debug config
RUN mv "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini"
# Additional PHP ini configuration
COPY ./999-php.ini /usr/local/etc/php/conf.d/
# Sample index.php with phpinfo() and entrypoint
COPY ./index.php /var/www/html/index.php
# Install ssmtp Mail Transfer Agent
RUN apt-get update \
&& apt-get install -y ssmtp \
&& apt-get clean \
&& echo "FromLineOverride=YES" >> /etc/ssmtp/ssmtp.conf \
&& echo 'sendmail_path = "/usr/sbin/ssmtp -t"' > /usr/local/etc/php/conf.d/mail.ini
# Install MySQL CLI Client & Text Editor
RUN apt-get update \
&& apt-get install -y mysql-client \
&& apt-get install -y vim-tiny \
&& apt-get clean
COPY ./vimrc /root/.vimrc
########################################################################################################################
# Start!
COPY ./start /usr/local/bin/
CMD ["start"]