-
Notifications
You must be signed in to change notification settings - Fork 30
/
Dockerfile
102 lines (78 loc) · 2.63 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
FROM php:8.0-apache
MAINTAINER Webgriffe Srl <support@webgriffe.com>
# Install GD
RUN apt-get update \
&& apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng16-16 \
&& docker-php-ext-configure gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/ \
&& docker-php-ext-install gd
# Install MCrypt
RUN apt-get update \
&& apt-get install -y libmcrypt-dev \
&& pecl install mcrypt-1.0.4 \
&& docker-php-ext-enable 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-3.0.0 \
&& 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 Oniguruma
RUN apt-get update \
&& apt-get install -y libonig-dev
# 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 apt-get update \
&& apt-get install -y libzip-dev \
&& 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
# Configure Apache ServerName
ENV APACHE_SERVER_NAME localhost
# 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 imap
RUN apt-get update \
&& apt-get install -y libc-client-dev libkrb5-dev \
&& docker-php-ext-configure imap --with-kerberos --with-imap-ssl \
&& docker-php-ext-install imap
# Install MySQL CLI Client
RUN apt-get update \
&& apt-get install -y default-mysql-client
########################################################################################################################
# Start!
COPY ./start /usr/local/bin/
CMD ["start"]