@@ -3,60 +3,67 @@ FROM php:7.2-apache
3
3
4
4
ENV http_proxy ${HTTP_PROXY}
5
5
ENV https_proxy ${HTTP_PROXY}
6
+ ENV XDEBUG_ENABLED=false
7
+ ENV NR_ENABLED=false
8
+ ENV NR_APP_NAME=""
9
+ ENV NR_LICENSE_KEY=""
10
+ ENV SESSION_HANDLER=false
11
+ ENV SESSION_HANDLER_NAME=""
12
+ ENV SESSION_HANDLER_PATH=""
6
13
7
- COPY configs/ports.conf /etc/apache2/ports.conf
8
- COPY apache-run.sh /usr/bin/apache-run
9
-
10
- RUN chmod a+x /usr/bin/apache-run
11
-
12
- # Install libs
13
- RUN apt-get update && apt-get install -y wget supervisor libfreetype6-dev \
14
- libjpeg62-turbo-dev libpng-dev git libxslt-dev \
15
- libldap2-dev libicu-dev libc-client-dev libkrb5-dev
14
+ RUN apt-get update && apt-get install -y wget vim supervisor zip libfreetype6-dev libjpeg62-turbo-dev \
15
+ libmcrypt-dev libpng-dev libssl-dev libaio1 git libcurl4-openssl-dev libxslt-dev \
16
+ libldap2-dev libicu-dev libc-client-dev libkrb5-dev libsqlite3-dev libedit-dev \
17
+ sudo
16
18
17
19
RUN a2enmod rewrite
18
20
19
- # Install PHP extensions
20
21
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
21
22
&& docker-php-ext-configure hash --with-mhash \
22
23
&& docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \
23
24
&& docker-php-ext-configure imap --with-kerberos --with-imap-ssl \
24
- && docker-php-ext-install -j$(nproc) bcmath \
25
- gd pdo_mysql calendar exif gettext \
26
- xsl ldap intl imap \
27
- pcntl shmop soap sockets wddx zip
28
-
29
- # Install ssh2
30
- RUN apt-get update && apt-get -y install libssh2-1-dev && \
31
- pecl install -f ssh2-alpha && \
32
- echo "extension=ssh2.so" >> /usr/local/etc/php/conf.d/ssh2.ini && \
33
- rm -rf /var/lib/apt/lists/*
34
-
35
- # Install oci8
36
- RUN apt-get update && apt-get -y install wget bsdtar libaio1 && \
37
- wget -qO- https://raw.githubusercontent.com/caffeinalab/php-fpm-oci8/master/oracle/instantclient-basic-linux.x64-12.2.0.1.0.zip | bsdtar -xvf- -C /usr/local && \
38
- wget -qO- https://raw.githubusercontent.com/caffeinalab/php-fpm-oci8/master/oracle/instantclient-sdk-linux.x64-12.2.0.1.0.zip | bsdtar -xvf- -C /usr/local && \
39
- wget -qO- https://raw.githubusercontent.com/caffeinalab/php-fpm-oci8/master/oracle/instantclient-sqlplus-linux.x64-12.2.0.1.0.zip | bsdtar -xvf- -C /usr/local && \
40
- ln -s /usr/local/instantclient_12_2 /usr/local/instantclient && \
41
- ln -s /usr/local/instantclient/libclntsh.so.* /usr/local/instantclient/libclntsh.so && \
42
- ln -s /usr/local/instantclient/lib* /usr/lib && \
43
- ln -s /usr/local/instantclient/sqlplus /usr/bin/sqlplus && \
44
- docker-php-ext-configure oci8 --with-oci8=instantclient,/usr/local/instantclient && \
45
- docker-php-ext-install oci8 && \
46
- rm -rf /var/lib/apt/lists/* && \
47
- php -v
48
-
49
- # Install redis
25
+ && docker-php-ext-install -j$(nproc) iconv bcmath mcrypt \
26
+ gd pdo_mysql calendar curl exif ftp gettext \
27
+ hash xsl ldap intl imap pdo_sqlite mbstring \
28
+ mcrypt pcntl readline shmop soap sockets wddx zip
29
+
50
30
RUN pecl install redis \
51
- && docker-php-ext-enable redis
31
+ && echo "extension=redis.so" >> /usr/local/etc/php/conf.d/redis.ini
32
+
33
+ RUN echo "---> Adding Support for NewRelic" && \
34
+ mkdir /tmp/newrelic /scripts/ && \
35
+ cd /tmp/newrelic && \
36
+ wget -r -l1 -nd -A"linux.tar.gz" https://download.newrelic.com/php_agent/release/ && \
37
+ gzip -dc newrelic*.tar.gz | tar xf - && \
38
+ cd newrelic-php5* && \
39
+ rm -f /usr/local/lib/php/extensions/no-debug-non-zts-20151012/newrelic.so && \
40
+ cp ./agent/x64/newrelic-20151012.so /usr/local/lib/php/extensions/no-debug-non-zts-20151012/newrelic.so && \
41
+ cp ./daemon/newrelic-daemon.x64 /usr/bin/newrelic-daemon && \
42
+ cp ./scripts/newrelic.ini.template /scripts/newrelic.ini && \
43
+ mkdir /var/log/newrelic && \
44
+ chown -R www-data:www-data /var/log/newrelic && \
45
+ rm -rf /tmp/*
46
+
47
+ RUN echo "---> Adding Tini" && \
48
+ wget -O /tini https://github.com/krallin/tini/releases/download/v0.18.0/tini-static && \
49
+ chmod +x /tini
50
+
51
+ RUN echo "---> Config sudoers" && \
52
+ echo "www-data ALL = ( ALL ) NOPASSWD: ALL" >> /etc/sudoers
52
53
53
- # Install Composer
54
54
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin/ --filename=composer
55
55
56
- # Install XDebug
57
56
RUN pecl install xdebug
58
57
59
- # Run composer install
60
- CMD /usr/bin/apache-run
58
+ COPY configs/ports.conf /etc/apache2/ports.conf
59
+ COPY apache-run.sh /usr/bin/apache-run
60
+
61
+ RUN chmod a+x /usr/bin/apache-run
62
+
63
+ USER www-data
64
+
65
+ WORKDIR "/var/www/html"
66
+
67
+ EXPOSE 8080 9001
61
68
62
- EXPOSE 8080
69
+ CMD [ "/tini" , "--" , "/usr/bin/apache-run" ]
0 commit comments