Skip to content

Commit 6dbbe93

Browse files
committed
feat: #30 bundle pdo_pgsql
1 parent 2ddcf9c commit 6dbbe93

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

Dockerfile

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
FROM dunglas/frankenphp:latest
22

33
RUN apt-get update \
4-
&& apt-get install -y nodejs npm unzip \
4+
&& apt-get install -y nodejs npm unzip libpq-dev \
55
&& apt-get clean && rm -rf /var/lib/apt/lists /var/cache/apt/archives \
6-
&& curl https://raw.githubusercontent.com/composer/getcomposer.org/76a7060ccb93902cd7576b67264ad91c8a2700e2/web/installer | php -- --quiet
6+
&& curl https://raw.githubusercontent.com/composer/getcomposer.org/76a7060ccb93902cd7576b67264ad91c8a2700e2/web/installer | php -- --quiet \
7+
&& docker-php-ext-configure pgsql \
8+
&& docker-php-ext-install pdo pdo_pgsql pgsql \
9+
&& docker-php-source delete
710

811
WORKDIR /app
912

@@ -28,4 +31,5 @@ RUN npm run build \
2831
&& apt-get -y remove npm unzip \
2932
&& apt-get -y clean \
3033
&& apt-get -y autoremove \
31-
&& mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
34+
&& mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" \
35+
&& echo "extension=pdo_pgsql.so" > $PHP_INI_DIR/conf.d/pdo_pgsql.ini

0 commit comments

Comments
 (0)