Skip to content
This repository was archived by the owner on Aug 16, 2021. It is now read-only.

Commit bc6848e

Browse files
authored
Merge pull request #57 from startupturbo/docker_fixes
docker: better formatting, no volumes, typo
2 parents 8ab054f + 21a3f26 commit bc6848e

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

docker/Dockerfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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)
1818
RUN 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

4749
EXPOSE 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
5254
CMD ["/pg_start.sh"]
53-

docker/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ How to build/rebuild:
33
```bash
44
docker build --build-arg PG_SERVER_VERSION=9.6 -t postgresmen/postgres-with-stuff:pg9.6 .
55
docker login # you must be registered, go to hub.docker.com
6-
doker push postgresmen/postgres-with-stuff:pg9.6
6+
docker push postgresmen/postgres-with-stuff:pg9.6
77
```

0 commit comments

Comments
 (0)