Skip to content

Commit e1ecdfb

Browse files
committed
copying all libs from builder stage
1 parent 1034c2e commit e1ecdfb

File tree

2 files changed

+27
-9
lines changed

2 files changed

+27
-9
lines changed

Dockerfile

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,8 @@ COPY --from=mlocati/php-extension-installer:latest /usr/bin/install-php-extensio
6060
# Install standard extensions
6161
RUN install-php-extensions mysqli redis pdo_mysql pdo_pgsql fileinfo intl sockets bcmath xsl soap zip pcov
6262

63-
64-
# The extension needs these .so files at runtime!
65-
COPY --from=builder /usr/local/lib/libgrpc*.so* /usr/local/lib/
66-
COPY --from=builder /usr/local/lib/libgpr*.so* /usr/local/lib/
67-
COPY --from=builder /usr/local/lib/libabsl*.so* /usr/local/lib/
68-
COPY --from=builder /usr/local/lib/libre2*.so* /usr/local/lib/
69-
COPY --from=builder /usr/local/lib/libaddress_sorting*.so* /usr/local/lib/
70-
# (Optional: Copying the whole /usr/local/lib is often easier if the builder is clean)
71-
# COPY --from=builder /usr/local/lib /usr/local/lib
63+
# Copy ALL shared libraries from the builder to runtime
64+
COPY --from=builder /usr/local/lib/ /usr/local/lib/
7265

7366
# Update the linker cache so PHP can find the new libraries
7467
RUN ldconfig

Dockerfile.nogrpc

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
FROM php:8.5-cli
2+
3+
# Standard Environment Setup
4+
ENV COMPOSER_ALLOW_SUPERUSER=1
5+
6+
# Install system dependencies
7+
RUN apt-get update && apt-get install -y \
8+
unzip \
9+
git \
10+
zip \
11+
curl \
12+
libzip-dev \
13+
libonig-dev \
14+
libxml2-dev \
15+
default-mysql-client \
16+
&& apt-get clean && rm -rf /var/lib/apt/lists/*
17+
18+
# Copy Composer
19+
COPY --from=composer:2.8.9 /usr/bin/composer /usr/bin/composer
20+
21+
# Copy install-php-extensions
22+
COPY --from=mlocati/php-extension-installer:latest /usr/bin/install-php-extensions /usr/local/bin/
23+
24+
# Install standard extensions
25+
RUN install-php-extensions mysqli redis pdo_mysql pdo_pgsql fileinfo intl sockets bcmath xsl soap zip pcov

0 commit comments

Comments
 (0)