Repository navigation
Expand file tree
/
Copy pathDockerfile
More file actions
86 lines (65 loc) · 2.2 KB
/
Copy pathDockerfile
File metadata and controls
86 lines (65 loc) · 2.2 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
78
79
80
81
82
83
84
85
86
FROM php:7.0-apache
MAINTAINER Webgriffe Srl <support@webgriffe.com>
# Install GD
RUN apt-get update \
&& apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng12-dev \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install gd
# Install MCrypt
RUN apt-get update \
&& apt-get install -y libmcrypt-dev \
&& docker-php-ext-install mcrypt
# Install Intl
RUN apt-get update \
&& apt-get install -y libicu-dev \
&& docker-php-ext-install intl
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 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
# Install opcache
RUN docker-php-ext-install opcache
# Install PHP zip extension
RUN docker-php-ext-install zip
# Install Git
RUN apt-get update \
&& apt-get install -y git
# Install xsl
RUN apt-get update \
&& apt-get install -y libxslt-dev \
&& docker-php-ext-install xsl
# 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
# Additional PHP ini configuration
COPY ./999-php.ini /usr/local/etc/php/conf.d/
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
RUN apt-get update \
&& apt-get install -y mysql-client
########################################################################################################################
# Start!
COPY ./start /usr/local/bin/
CMD ["start"]