Skip to content

Commit 9119e49

Browse files
committed
feat: mongodb
1 parent f4f3aae commit 9119e49

File tree

2 files changed

+7
-93
lines changed

2 files changed

+7
-93
lines changed

Dockerfile

Lines changed: 6 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -1,95 +1,9 @@
1-
# Container Base
2-
FROM php:8.2-apache
1+
FROM lojassimonetti/php-apache-oci8-composer:php8dot2
32

4-
ENV \
5-
NR_ENABLED=false \
6-
NR_APP_NAME="" \
7-
NR_LICENSE_KEY="" \
8-
NR_VERSION="" \
9-
PHP_BUILD_DATE="20211130" \
10-
PHP_OPCACHE_ENABLED=false \
11-
SESSION_HANDLER=false \
12-
SESSION_HANDLER_NAME="" \
13-
SESSION_HANDLER_PATH="" \
14-
XDEBUG_AUTOSTART=false \
15-
XDEBUG_CONNECT_BACK=true \
16-
XDEBUG_ENABLED=false \
17-
XDEBUG_IDEKEY="docker" \
18-
XDEBUG_VERSION="" \
19-
XDEBUG_REMOTE_PORT=9000 \
20-
PHP_EXTENSION_WDDX=1 \
21-
PHP_OPENSSL=1
3+
USER root
224

23-
RUN apt-get update && apt-get install -y --no-install-recommends wget vim supervisor libfreetype6-dev libjpeg62-turbo-dev \
24-
libmcrypt-dev libpng-dev libssl-dev libaio1 git libcurl4-openssl-dev libxslt-dev \
25-
libldap2-dev libicu-dev libc-client-dev libkrb5-dev libsqlite3-dev libedit-dev \
26-
sudo zlib1g zlib1g-dev libzip4 libzip-dev zip unzip librabbitmq-dev musl-dev && \
27-
rm -rf /var/lib/apt/lists/*
5+
RUN echo "---> Mongo DB" && \
6+
pecl install mongodb && \
7+
docker-php-ext-enable mongodb
288

29-
RUN a2enmod rewrite unique_id
30-
31-
RUN docker-php-ext-configure gd \
32-
&& docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \
33-
&& docker-php-ext-configure imap --with-kerberos --with-imap-ssl \
34-
&& docker-php-ext-install -j$(nproc) bcmath gd pdo_mysql calendar exif gettext shmop soap sockets intl pcntl xsl ldap imap
35-
36-
RUN echo "---> Adding Redis" && \
37-
pecl install redis && \
38-
docker-php-ext-enable redis
39-
40-
RUN echo "---> Adding xDebug" && \
41-
pecl install "xdebug${XDEBUG_VERSION}"
42-
43-
RUN echo "---> Adding Zip" && \
44-
pecl install zip && \
45-
docker-php-ext-enable zip
46-
47-
RUN echo "---> Adding AMQp" && \
48-
apt-get update && apt-get install -y -f librabbitmq-dev libssh-dev \
49-
&& docker-php-source extract \
50-
&& mkdir /usr/src/php/ext/amqp \
51-
&& curl -L https://github.com/php-amqp/php-amqp/archive/master.tar.gz | tar -xzC /usr/src/php/ext/amqp --strip-components=1 \
52-
&& docker-php-ext-install amqp \
53-
&& docker-php-ext-enable amqp
54-
55-
RUN echo "---> Configure Opcache" && \
56-
docker-php-ext-install opcache && \
57-
echo "opcache.enable=0" >> /usr/local/etc/php/conf.d/docker-php-ext-opcache.ini && \
58-
echo "opcache.enable_cli=0" >> /usr/local/etc/php/conf.d/docker-php-ext-opcache.ini
59-
60-
RUN echo "---> Adding NewRelic" && \
61-
apt-get update && apt-get install -y -q --no-install-recommends --no-install-suggests gnupg2 \
62-
&& echo 'deb http://apt.newrelic.com/debian/ newrelic non-free' | sudo tee /etc/apt/sources.list.d/newrelic.list \
63-
&& wget -O- https://download.newrelic.com/548C16BF.gpg | sudo apt-key add - \
64-
&& sudo apt-get update && apt-get install -y -q --no-install-recommends --no-install-suggests newrelic-php5 \
65-
&& NR_INSTALL_USE_CP_NOT_LN=1 NR_INSTALL_SILENT=1 newrelic-install install \
66-
&& chown www-data:www-data /usr/local/etc/php/conf.d/newrelic.ini && chmod a+rw /usr/local/etc/php/conf.d/newrelic.ini \
67-
&& apt-get remove -y gnupg2 && rm -rf /var/lib/apt/lists/* \
68-
&& echo "newrelic.distributed_tracing_enabled = false" | sudo tee -a /usr/local/etc/php/conf.d/newrelic.ini
69-
70-
RUN echo "---> Adding Tini" && \
71-
wget -O /tini https://github.com/krallin/tini/releases/download/v0.18.0/tini-static && \
72-
chmod +x /tini
73-
74-
RUN echo "---> Config sudoers" && \
75-
echo "www-data ALL = ( ALL ) NOPASSWD: ALL" >> /etc/sudoers
76-
77-
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
78-
RUN echo "---> Fix permissions" \
79-
&& chown -R www-data:www-data /var/log/apache2 \
80-
&& mkdir /var/www/.composer && chown -R www-data:www-data /var/www/.composer
81-
82-
COPY configs/ports.conf /etc/apache2/ports.conf
83-
COPY configs/logs.conf /etc/apache2/conf-enabled/logs.conf
84-
COPY apache-run.sh /usr/bin/apache-run
85-
COPY ./bin /usr/bin/
86-
87-
RUN chmod a+x /usr/bin/apache-run /usr/bin/xdebug-set-mode
88-
89-
USER www-data
90-
91-
WORKDIR "/var/www/html"
92-
93-
EXPOSE 8080 9001
94-
95-
CMD ["/tini", "--", "/usr/bin/apache-run"]
9+
USER www-data:www-data

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# php-apache-oci8-composer
2-
Our docker image with php 8.2, apache and composer 2
2+
Our docker image with php 8.2, apache, composer 2 and mongodb

0 commit comments

Comments
 (0)