Skip to content

Commit 146204f

Browse files
author
Ubuntu
committed
added pg_show_plans extension support
1 parent 08fa911 commit 146204f

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

extended/Dockerfile

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ RUN apt-get update \
1717
&& apt-get install --no-install-recommends -y postgresql-${PG_SERVER_VERSION}-hypopg-dbgsym \
1818
&& apt-get install --no-install-recommends -y apt-transport-https \
1919
&& apt-get install --no-install-recommends -y ca-certificates \
20+
&& apt-get install --no-install-recommends -y git \
2021
&& apt-get -y --no-install-recommends install curl
2122

2223
RUN if [ "${PG_SERVER_VERSION}" = "12" ]; then \
@@ -51,13 +52,21 @@ RUN wget https://github.com/cybertec-postgresql/pg_timetable/releases/download/v
5152
&& dpkg -i pg_timetable_2.3.0_Linux_x86_64.deb \
5253
&& rm -rf pg_timetable_2.3.0_Linux_x86_64.deb
5354

55+
# add pg_show_plans extension
56+
RUN git clone https://github.com/cybertec-postgresql/pg_show_plans.git
57+
WORKDIR /pg_show_plans
58+
RUN export USE_PGXS=1 && make && make install
59+
WORKDIR /
60+
61+
5462
# Reduce images size.
5563
RUN rm -rf /tmp/* \
56-
&& apt-get purge -y --auto-remove gcc make wget unzip curl apt-transport-https postgresql-server-dev-${PG_SERVER_VERSION} \
64+
&& apt-get purge -y --auto-remove gcc make wget unzip curl apt-transport-https git postgresql-server-dev-${PG_SERVER_VERSION} \
5765
&& apt-get clean -y autoclean \
5866
&& rm -rf /var/lib/apt/lists/* \
67+
&& rm -rf /pg_show_plans \
5968
# We don't want to use standard pgdata.
60-
&& rm -rf /var/lib/postgresql/${PG_SERVER_VERSION}/
69+
&& rm -rf /var/lib/postgresql/${PG_SERVER_VERSION}/
6170

6271
EXPOSE 5432
6372

0 commit comments

Comments
 (0)