Skip to content

Commit 526990f

Browse files
committed
Merge branch 'php8dot4'
2 parents 14a6ca1 + 533a541 commit 526990f

File tree

3 files changed

+45
-37
lines changed

3 files changed

+45
-37
lines changed

Dockerfile

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
# Container Base
2-
FROM php:8.3-apache
2+
FROM php:8.4-apache
33

44
ENV \
55
NR_ENABLED=false \
66
NR_APP_NAME="" \
77
NR_LICENSE_KEY="" \
88
NR_VERSION="" \
9-
PHP_BUILD_DATE="20211130" \
109
PHP_OPCACHE_ENABLED=false \
1110
SESSION_HANDLER=false \
1211
SESSION_HANDLER_NAME="" \
@@ -15,7 +14,9 @@ ENV \
1514
XDEBUG_CONNECT_BACK=true \
1615
XDEBUG_ENABLED=false \
1716
XDEBUG_IDEKEY="docker" \
18-
XDEBUG_VERSION="-3.3.2" \
17+
XDEBUG_VERSION="-3.4.1" \
18+
REDIS_VERSION="-6.1.0" \
19+
IMAP_VERSION="" \
1920
XDEBUG_REMOTE_PORT=9000 \
2021
PHP_EXTENSION_WDDX=1 \
2122
PHP_OPENSSL=1 \
@@ -31,11 +32,14 @@ RUN a2enmod rewrite unique_id headers
3132

3233
RUN docker-php-ext-configure gd --with-jpeg \
3334
&& docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \
34-
&& docker-php-ext-configure imap --with-kerberos --with-imap-ssl \
35-
&& docker-php-ext-install -j$(nproc) bcmath gd pdo_mysql calendar exif gettext shmop soap sockets intl pcntl xsl ldap imap ftp
35+
&& docker-php-ext-install -j$(nproc) bcmath gd pdo_mysql calendar exif gettext shmop soap sockets intl pcntl xsl ldap ftp
36+
37+
RUN echo "---> Adding IMAP" && \
38+
pecl install imap${IMAP_VERSION} && \
39+
docker-php-ext-enable imap
3640

3741
RUN echo "---> Adding Redis" && \
38-
pecl install redis && \
42+
pecl install redis${REDIS_VERSION} && \
3943
docker-php-ext-enable redis
4044

4145
RUN echo "---> Adding xDebug" && \
@@ -58,22 +62,23 @@ RUN echo "---> Configure Opcache" && \
5862
echo "opcache.enable=0" >> /usr/local/etc/php/conf.d/docker-php-ext-opcache.ini && \
5963
echo "opcache.enable_cli=0" >> /usr/local/etc/php/conf.d/docker-php-ext-opcache.ini
6064

65+
RUN echo "---> Adding Tini" && \
66+
wget -O /tini https://github.com/krallin/tini/releases/download/v0.18.0/tini-static && \
67+
chmod +x /tini
68+
6169
RUN echo "---> Adding NewRelic" && \
6270
apt-get update && apt-get install -y -q --no-install-recommends --no-install-suggests gnupg2 \
6371
&& echo 'deb http://apt.newrelic.com/debian/ newrelic non-free' | sudo tee /etc/apt/sources.list.d/newrelic.list \
6472
&& wget -O- https://download.newrelic.com/548C16BF.gpg | sudo apt-key add - \
6573
&& sudo apt-get update && apt-get install -y -q --no-install-recommends --no-install-suggests newrelic-php5 \
6674
&& NR_INSTALL_USE_CP_NOT_LN=1 NR_INSTALL_SILENT=1 newrelic-install install \
75+
&& cp /usr/lib/newrelic-php5/scripts/newrelic.ini.template /usr/local/etc/php/conf.d/newrelic.ini \
6776
&& chown www-data:www-data /usr/local/etc/php/conf.d/newrelic.ini && chmod a+rw /usr/local/etc/php/conf.d/newrelic.ini \
68-
&& apt-get remove -y gnupg2 && rm -rf /var/lib/apt/lists/* \
77+
&& apt-get remove -y gnupg2 && rm -rf /var/lib/apt/lists/* #\
6978
&& echo "newrelic.distributed_tracing_enabled = false" | sudo tee -a /usr/local/etc/php/conf.d/newrelic.ini \
7079
&& echo "newrelic.application_logging.enabled = false" | sudo tee -a /usr/local/etc/php/conf.d/newrelic.ini \
7180
&& echo "newrelic.enabled = false" | sudo tee -a /usr/local/etc/php/conf.d/newrelic.ini
7281

73-
RUN echo "---> Adding Tini" && \
74-
wget -O /tini https://github.com/krallin/tini/releases/download/v0.18.0/tini-static && \
75-
chmod +x /tini
76-
7782
RUN echo "---> Config sudoers" && \
7883
echo "www-data ALL = ( ALL ) NOPASSWD: ALL" >> /etc/sudoers
7984

apache-run.sh

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,6 @@
22

33
set -e
44

5-
rm -f $CONTAINER_STARTED_LOCK
6-
7-
if [[ ${XDEBUG_ENABLED} == true ]]; then
8-
sudo -E xdebug-set-mode ${XDEBUG_MODE:-debug}
9-
fi
10-
11-
sudo -E newrelic-setup
12-
sudo -E opcache-setup
13-
14-
if [[ ${SESSION_HANDLER} == true ]]; then
15-
sudo rm -f /usr/local/etc/php/conf.d/session-handler.ini
16-
echo "session.save_handler = ${SESSION_HANDLER_NAME}" | sudo tee -a /usr/local/etc/php/conf.d/session-handler.ini
17-
echo "session.save_path = \"${SESSION_HANDLER_PATH}\"" | sudo tee -a /usr/local/etc/php/conf.d/session-handler.ini
18-
fi
19-
20-
sudo rm -rf var/cache/* var/logs/* &&
21-
sudo mkdir -p /var/www/html/var/cache &&
22-
sudo mkdir -p /var/www/html/var/logs &&
23-
sudo mkdir -p /var/www/html/var/sessions &&
24-
sudo chown -R www-data:www-data /var/www/html/var/cache && chmod 777 /var/www/html/var/cache &&
25-
sudo chown -R www-data:www-data /var/www/html/var/logs && chmod 777 /var/www/html/var/logs &&
26-
sudo chown -R www-data:www-data /var/www/html/var/sessions && chmod 777 /var/www/html/var/sessions
27-
28-
post-startup-hook
29-
30-
touch $CONTAINER_STARTED_LOCK
5+
server-warmup
316

327
exec apache2-foreground

bin/server-warmup

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/bash
2+
3+
rm -f $CONTAINER_STARTED_LOCK
4+
5+
if [[ ${XDEBUG_ENABLED} == true ]]; then
6+
sudo -E xdebug-set-mode ${XDEBUG_MODE:-debug}
7+
fi
8+
9+
sudo -E newrelic-setup
10+
sudo -E opcache-setup
11+
12+
if [[ ${SESSION_HANDLER} == true ]]; then
13+
sudo rm -f /usr/local/etc/php/conf.d/session-handler.ini
14+
echo "session.save_handler = ${SESSION_HANDLER_NAME}" | sudo tee -a /usr/local/etc/php/conf.d/session-handler.ini
15+
echo "session.save_path = \"${SESSION_HANDLER_PATH}\"" | sudo tee -a /usr/local/etc/php/conf.d/session-handler.ini
16+
fi
17+
18+
sudo rm -rf var/cache/* var/logs/* &&
19+
sudo mkdir -p /var/www/html/var/cache &&
20+
sudo mkdir -p /var/www/html/var/logs &&
21+
sudo mkdir -p /var/www/html/var/sessions &&
22+
sudo chown -R www-data:www-data /var/www/html/var/cache && chmod 777 /var/www/html/var/cache &&
23+
sudo chown -R www-data:www-data /var/www/html/var/logs && chmod 777 /var/www/html/var/logs &&
24+
sudo chown -R www-data:www-data /var/www/html/var/sessions && chmod 777 /var/www/html/var/sessions
25+
26+
post-startup-hook
27+
28+
touch $CONTAINER_STARTED_LOCK

0 commit comments

Comments
 (0)