Enhance Docker API build configuration
- 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
This commit is contained in:
parent
5f0fc2f62d
commit
29640fc70b
|
|
@ -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/*
|
||||
|
||||
|
|
@ -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/
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue