@@ -17,8 +17,10 @@ ADD ./postgresql_${PG_SERVER_VERSION}_tweak.conf /postgresql.tweak.conf
17
17
# - pgbadger (modified, not lowercasing DB object names, auto_explain compatibility)
18
18
RUN apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8 \
19
19
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main" > /etc/apt/sources.list.d/pgdg.list \
20
- && apt-get update && apt-get install -y sudo postgresql-$PG_SERVER_VERSION postgresql-contrib-$PG_SERVER_VERSION postgresql-plpython-$PG_SERVER_VERSION \
21
- && apt-get install -y postgresql-$PG_SERVER_VERSION-plsh postgresql-server-dev-$PG_SERVER_VERSION postgresql-$PG_SERVER_VERSION-rum \
20
+ && apt-get update && apt-get install -y sudo postgresql-$PG_SERVER_VERSION \
21
+ && apt-get install -y postgresql-contrib-$PG_SERVER_VERSION postgresql-plpython-$PG_SERVER_VERSION \
22
+ && apt-get install -y postgresql-$PG_SERVER_VERSION-plsh postgresql-server-dev-$PG_SERVER_VERSION \
23
+ && apt-get install -y postgresql-$PG_SERVER_VERSION-rum \
22
24
&& apt-get install -y git postgresql-client-10 pspg pgreplay jq etcd libjson-xs-perl \
23
25
&& perl -MCPAN -e'install Text::CSV_XS' \
24
26
&& git clone https://github.com/NikolayS/postgres_dba.git /root/postgres_dba \
@@ -41,7 +43,7 @@ RUN echo "\\set dba '\\\\\\\\i /root/postgres_dba/start.psql'" >> ~/.psqlrc \
41
43
&& /etc/init.d/postgresql start && psql -U postgres -c 'create database test;' && /etc/init.d/postgresql stop \
42
44
&& cat /postgresql.tweak.conf >> /etc/postgresql/$PG_SERVER_VERSION/main/postgresql.conf \
43
45
&& echo "#!/bin/bash" > /pg_start.sh && chmod a+x /pg_start.sh \
44
- && printf "sudo -u postgres /usr/lib/postgresql/$PG_SERVER_VERSION/bin/postgres -D /var/lib/postgresql/$PG_SERVER_VERSION/main -c config_file=/etc/ postgresql/$PG_SERVER_VERSION/main/postgresql.conf & \n " >> /pg_start.sh \
46
+ && printf "sudo -u postgres /usr/lib/postgresql/$PG_SERVER_VERSION/bin/postgres -D /var/lib/postgresql/$PG_SERVER_VERSION/main -c config_file=/etc/postgresql/$PG_SERVER_VERSION/main/postgresql.conf & \n " >> /pg_start.sh \
45
47
&& echo "etcd" >> /pg_start.sh
46
48
47
49
EXPOSE 5432
@@ -50,4 +52,3 @@ EXPOSE 5432
50
52
51
53
# etcd is not being actually used (it's for future needs), but it allows restart Postgres with container interruption
52
54
CMD ["/pg_start.sh" ]
53
-
0 commit comments