Skip to content

Commit

Permalink
feat: php8.4 no newrelic
Browse files Browse the repository at this point in the history
  • Loading branch information
lucassabreu committed Dec 6, 2024
1 parent 88c015c commit 89c01cb
Showing 1 changed file with 23 additions and 18 deletions.
41 changes: 23 additions & 18 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
# Container Base
FROM php:8.3-apache
FROM php:8.4-apache

ENV \
NR_ENABLED=false \
NR_APP_NAME="" \
NR_LICENSE_KEY="" \
NR_VERSION="" \
PHP_BUILD_DATE="20211130" \
PHP_OPCACHE_ENABLED=false \
SESSION_HANDLER=false \
SESSION_HANDLER_NAME="" \
Expand All @@ -15,8 +14,9 @@ ENV \
XDEBUG_CONNECT_BACK=true \
XDEBUG_ENABLED=false \
XDEBUG_IDEKEY="docker" \
XDEBUG_VERSION="-3.3.2" \
REDIS_VERSION="-5.3.7" \
XDEBUG_VERSION="-3.4.0beta1" \
REDIS_VERSION="-6.1.0" \
IMAP_VERSION="" \
XDEBUG_REMOTE_PORT=9000 \
PHP_EXTENSION_WDDX=1 \
PHP_OPENSSL=1 \
Expand All @@ -32,8 +32,11 @@ RUN a2enmod rewrite unique_id headers

RUN docker-php-ext-configure gd --with-jpeg \
&& docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \
&& docker-php-ext-configure imap --with-kerberos --with-imap-ssl \
&& docker-php-ext-install -j$(nproc) bcmath gd pdo_mysql calendar exif gettext shmop soap sockets intl pcntl xsl ldap imap ftp
&& docker-php-ext-install -j$(nproc) bcmath gd pdo_mysql calendar exif gettext shmop soap sockets intl pcntl xsl ldap ftp

RUN echo "---> Adding IMAP" && \
pecl install imap${IMAP_VERSION} && \
docker-php-ext-enable imap

RUN echo "---> Adding Redis" && \
pecl install redis${REDIS_VERSION} && \
Expand All @@ -59,22 +62,24 @@ RUN echo "---> Configure Opcache" && \
echo "opcache.enable=0" >> /usr/local/etc/php/conf.d/docker-php-ext-opcache.ini && \
echo "opcache.enable_cli=0" >> /usr/local/etc/php/conf.d/docker-php-ext-opcache.ini

RUN echo "---> Adding NewRelic" && \
apt-get update && apt-get install -y -q --no-install-recommends --no-install-suggests gnupg2 \
&& echo 'deb http://apt.newrelic.com/debian/ newrelic non-free' | sudo tee /etc/apt/sources.list.d/newrelic.list \
&& wget -O- https://download.newrelic.com/548C16BF.gpg | sudo apt-key add - \
&& sudo apt-get update && apt-get install -y -q --no-install-recommends --no-install-suggests newrelic-php5 \
&& NR_INSTALL_USE_CP_NOT_LN=1 NR_INSTALL_SILENT=1 newrelic-install install \
&& chown www-data:www-data /usr/local/etc/php/conf.d/newrelic.ini && chmod a+rw /usr/local/etc/php/conf.d/newrelic.ini \
&& apt-get remove -y gnupg2 && rm -rf /var/lib/apt/lists/* \
&& echo "newrelic.distributed_tracing_enabled = false" | sudo tee -a /usr/local/etc/php/conf.d/newrelic.ini \
&& echo "newrelic.application_logging.enabled = false" | sudo tee -a /usr/local/etc/php/conf.d/newrelic.ini \
&& echo "newrelic.enabled = false" | sudo tee -a /usr/local/etc/php/conf.d/newrelic.ini

RUN echo "---> Adding Tini" && \
wget -O /tini https://github.com/krallin/tini/releases/download/v0.18.0/tini-static && \
chmod +x /tini

# reativar quando liberar
# RUN echo "---> Adding NewRelic" && \
# apt-get update && apt-get install -y -q --no-install-recommends --no-install-suggests gnupg2 \
# && echo 'deb http://apt.newrelic.com/debian/ newrelic non-free' | sudo tee /etc/apt/sources.list.d/newrelic.list \
# && wget -O- https://download.newrelic.com/548C16BF.gpg | sudo apt-key add - \
# && sudo apt-get update && apt-get install -y -q --no-install-recommends --no-install-suggests newrelic-php5 \
# && NR_INSTALL_USE_CP_NOT_LN=1 NR_INSTALL_SILENT=1 newrelic-install install \
# && cp /usr/lib/newrelic-php5/scripts/newrelic.ini.template /usr/local/etc/php/conf.d/newrelic.ini \
# && chown www-data:www-data /usr/local/etc/php/conf.d/newrelic.ini && chmod a+rw /usr/local/etc/php/conf.d/newrelic.ini \
# && apt-get remove -y gnupg2 && rm -rf /var/lib/apt/lists/* #\
# && echo "newrelic.distributed_tracing_enabled = false" | sudo tee -a /usr/local/etc/php/conf.d/newrelic.ini \
# && echo "newrelic.application_logging.enabled = false" | sudo tee -a /usr/local/etc/php/conf.d/newrelic.ini \
# && echo "newrelic.enabled = false" | sudo tee -a /usr/local/etc/php/conf.d/newrelic.ini

RUN echo "---> Config sudoers" && \
echo "www-data ALL = ( ALL ) NOPASSWD: ALL" >> /etc/sudoers

Expand Down

0 comments on commit 89c01cb

Please sign in to comment.