Skip to content

Commit

Permalink
Enhance Docker API build configuration
Browse files Browse the repository at this point in the history
- Add system build dependencies for PHP extension compilation
- Update PHP extension installation with explicit configuration
- Configure PostgreSQL extension with explicit path
- Improve build process with parallel extension installation
  • Loading branch information
JhumanJ committed Feb 4, 2025
1 parent 5f0fc2f commit 29640fc
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions docker/Dockerfile.api
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ RUN apt-get update && apt-get install -y \
postgresql-client \
libpq-dev \
unzip \
gcc \
make \
autoconf \
libc-dev \
pkg-config \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

Expand All @@ -15,9 +20,14 @@ COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer
ENV COMPOSER_ALLOW_SUPERUSER=1

# Install PHP extensions
RUN docker-php-ext-install pdo pgsql pdo_pgsql gd bcmath zip \
&& pecl install redis \
&& docker-php-ext-enable redis
RUN if [ "$(uname -m)" = "aarch64" ]; then \
export CFLAGS="$CFLAGS -D_GNU_SOURCE"; \
fi && \
docker-php-ext-install -j$(nproc) pdo zip bcmath gd && \
docker-php-ext-configure pgsql && \
docker-php-ext-install -j$(nproc) pgsql pdo_pgsql && \
pecl install -f --configureoptions 'enable-redis-igbinary="no" enable-redis-lzf="no" enable-redis-zstd="no" enable-redis-msgpack="no" enable-redis-lz4="no"' redis && \
docker-php-ext-enable redis

WORKDIR /usr/share/nginx/html/

Expand Down

0 comments on commit 29640fc

Please sign in to comment.