Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
FROM php:8.3-fpm

COPY --chmod=0755 entrypoint.sh /entrypoint.sh

# ---- system deps (required for compiling PHP extensions) ----
RUN apt-get update && apt-get install -y \
libpng-dev \
Expand All @@ -11,6 +13,7 @@ RUN apt-get update && apt-get install -y \
zip \
unzip \
libgmp-dev \
libpq-dev \
$PHPIZE_DEPS \
&& rm -rf /var/lib/apt/lists/*

Expand All @@ -23,6 +26,8 @@ RUN docker-php-ext-configure gd \
RUN docker-php-ext-install -j$(nproc) \
mysqli \
pdo_mysql \
pdo_pgsql \
pgsql \
gd \
zip \
intl \
Expand All @@ -33,8 +38,16 @@ RUN docker-php-ext-install -j$(nproc) \
RUN pecl install redis \
&& docker-php-ext-enable redis

# install xdebug but leave it off by default (configured in entrypoint)
RUN pecl install xdebug \
&& docker-php-ext-enable xdebug \
&& docker-php-source delete

# ---- install core extensions required by IPB 4.7 ----
RUN echo "memory_limit=256M" > /usr/local/etc/php/conf.d/memory.ini \
&& echo "upload_max_filesize=100M" > /usr/local/etc/php/conf.d/uploads.ini \
&& echo "post_max_size=100M" >> /usr/local/etc/php/conf.d/uploads.ini \
&& echo "opcache.enable=1" > /usr/local/etc/php/conf.d/opcache.ini

ENTRYPOINT ["/entrypoint.sh"]
CMD ["php-fpm"]
14 changes: 14 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/sh

if [ -n "$ENABLE_XDEBUG" ]; then
cat > /usr/local/etc/php/conf.d/xdebug.ini <<EOF
xdebug.mode=debug
xdebug.client_host=${XDEBUG_CLIENT:-host.docker.internal}
xdebug.start_with_request=yes
EOF
else
echo "; xdebug disabled" > /usr/local/etc/php/conf.d/xdebug.ini
echo "xdebug.mode=off" >> /usr/local/etc/php/conf.d/xdebug.ini
fi

exec "$@"
Loading