@@ -17,8 +17,10 @@ ADD ./postgresql_${PG_SERVER_VERSION}_tweak.conf /postgresql.tweak.conf
1717# - pgbadger (modified, not lowercasing DB object names, auto_explain compatibility)
1818RUN apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8 \
1919 && 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 \
2224 && apt-get install -y git postgresql-client-10 pspg pgreplay jq etcd libjson-xs-perl \
2325 && perl -MCPAN -e'install Text::CSV_XS' \
2426 && 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 \
4143 && /etc/init.d/postgresql start && psql -U postgres -c 'create database test;' && /etc/init.d/postgresql stop \
4244 && cat /postgresql.tweak.conf >> /etc/postgresql/$PG_SERVER_VERSION/main/postgresql.conf \
4345 && 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 \
4547 && echo "etcd" >> /pg_start.sh
4648
4749EXPOSE 5432
@@ -50,4 +52,3 @@ EXPOSE 5432
5052
5153# etcd is not being actually used (it's for future needs), but it allows restart Postgres with container interruption
5254CMD ["/pg_start.sh" ]
53-
0 commit comments