From db914fbf219b24a9ee6bc67e8acca04e277eb7bc Mon Sep 17 00:00:00 2001 From: xgaia Date: Thu, 18 Nov 2021 10:39:07 +0100 Subject: [PATCH 1/3] chore: install postgresql dependencies --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 314cb0f..0754af0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,6 +14,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ libldap2-dev \ libldap-2.4-2 \ libldap-common \ + libpq-dev \ netcat \ git \ imagemagick \ @@ -27,7 +28,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && docker-php-source extract # pcntl for Scribunto -RUN docker-php-ext-install -j$(nproc) mbstring xml intl mysqli ldap pcntl opcache \ +RUN docker-php-ext-install -j$(nproc) mbstring xml intl mysqli ldap pcntl opcache pdo pdo_pgsql \ && docker-php-ext-configure gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/ \ && docker-php-ext-install -j$(nproc) gd \ && docker-php-source delete \ From fd929f420bd47f96bf0b2fe6d39096915b07d728 Mon Sep 17 00:00:00 2001 From: xgaia Date: Thu, 18 Nov 2021 10:52:51 +0100 Subject: [PATCH 2/3] chore: more pgsql things --- Dockerfile | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 0754af0..4726831 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,17 @@ FROM php:7.4-apache + + +FROM php:7.4-fpm +RUN apt-get update && apt-get install -y libpq-dev +RUN docker-php-ext-install pdo pdo_pgsql pgsql +RUN ln -s /usr/local/etc/php/php.ini-production /usr/local/etc/php/php.ini +RUN sed -i -e 's/;extension=pgsql/extension=pgsql/' /usr/local/etc/php/php.ini +RUN sed -i -e 's/;extension=pdo_pgsql/extension=pdo_pgsql/' /usr/local/etc/php/php.ini + + + + ENV WIKI_VERSION_MAJOR_MINOR=1.35 ENV WIKI_VERSION_BUGFIX=3 ENV WIKI_VERSION=$WIKI_VERSION_MAJOR_MINOR.$WIKI_VERSION_BUGFIX @@ -28,7 +40,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && docker-php-source extract # pcntl for Scribunto -RUN docker-php-ext-install -j$(nproc) mbstring xml intl mysqli ldap pcntl opcache pdo pdo_pgsql \ +RUN docker-php-ext-install -j$(nproc) mbstring xml intl mysqli ldap pcntl opcache \ && docker-php-ext-configure gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/ \ && docker-php-ext-install -j$(nproc) gd \ && docker-php-source delete \ @@ -38,6 +50,12 @@ RUN docker-php-ext-install -j$(nproc) mbstring xml intl mysqli ldap pcntl opcach && a2enmod rewrite \ && rm -rf /tmp/pear +# pgsql +RUN docker-php-ext-install pdo pdo_pgsql pgsql \ + && ln -s /usr/local/etc/php/php.ini-production /usr/local/etc/php/php.ini \ + && sed -i -e 's/;extension=pgsql/extension=pgsql/' /usr/local/etc/php/php.ini \ + && sed -i -e 's/;extension=pdo_pgsql/extension=pdo_pgsql/' /usr/local/etc/php/php.ini + WORKDIR /var/www/html RUN curl -L https://releases.wikimedia.org/mediawiki/$WIKI_VERSION_MAJOR_MINOR/mediawiki-$WIKI_VERSION.tar.gz | tar xz --strip=1 From ac891139bad33d71429cd843ea3be3691a2efd3f Mon Sep 17 00:00:00 2001 From: xgaia Date: Thu, 18 Nov 2021 10:53:36 +0100 Subject: [PATCH 3/3] fix: remove unused lines --- Dockerfile | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4726831..f9c6e22 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,17 +1,5 @@ FROM php:7.4-apache - - -FROM php:7.4-fpm -RUN apt-get update && apt-get install -y libpq-dev -RUN docker-php-ext-install pdo pdo_pgsql pgsql -RUN ln -s /usr/local/etc/php/php.ini-production /usr/local/etc/php/php.ini -RUN sed -i -e 's/;extension=pgsql/extension=pgsql/' /usr/local/etc/php/php.ini -RUN sed -i -e 's/;extension=pdo_pgsql/extension=pdo_pgsql/' /usr/local/etc/php/php.ini - - - - ENV WIKI_VERSION_MAJOR_MINOR=1.35 ENV WIKI_VERSION_BUGFIX=3 ENV WIKI_VERSION=$WIKI_VERSION_MAJOR_MINOR.$WIKI_VERSION_BUGFIX