From 7a4349187c4d7a46c6bad6364a8e2a1d6eda6a31 Mon Sep 17 00:00:00 2001 From: AlbertChen Date: Fri, 26 Oct 2018 13:15:52 +0800 Subject: [PATCH 1/6] test.text upload (test) --- test.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 test.txt diff --git a/test.txt b/test.txt new file mode 100644 index 00000000..e69de29b From 2db6385e43b57516c1b19636b9f58af3f14e3173 Mon Sep 17 00:00:00 2001 From: AlbertChen Date: Fri, 26 Oct 2018 13:34:21 +0800 Subject: [PATCH 2/6] ENV add --- postgres/centos7/Dockerfile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/postgres/centos7/Dockerfile b/postgres/centos7/Dockerfile index 98c5c396..94ee5b8f 100644 --- a/postgres/centos7/Dockerfile +++ b/postgres/centos7/Dockerfile @@ -3,13 +3,17 @@ # # Originally written for Fedora-Dockerfiles by # scollier +ENV PG11=https://download.postgresql.org/pub/repos/yum/11/redhat/rhel-7-x86_64/pgdg-centos11-11-2.noarch.rpm PG9.5=https://download.postgresql.org/pub/repos/yum/9.5/redhat/rhel-7-x86_64/pgdg-centos95-9.5-3.noarch.rpm +ENV PGPATH=/usr/pgsql-9.5 FROM centos:centos7 MAINTAINER The CentOS Project -RUN yum -y update; yum clean all -RUN yum -y install sudo epel-release; yum clean all -RUN yum -y install postgresql-server postgresql postgresql-contrib supervisor pwgen; yum clean all +RUN yum -y update \ + && yum clean all \ + && yum -y install ${PG9.5} postgresql95 postgresql95-server postgresql95-contrib \ +#RUN yum -y install sudo epel-release; yum clean all +#RUN yum -y install postgresql-server postgresql postgresql-contrib supervisor pwgen; yum clean all ADD ./postgresql-setup /usr/bin/postgresql-setup ADD ./supervisord.conf /etc/supervisord.conf From 077229338951264de18784a3f61d3a0e8751a7f4 Mon Sep 17 00:00:00 2001 From: AlbertChen Date: Fri, 26 Oct 2018 16:52:50 +0800 Subject: [PATCH 3/6] error fix --- postgres/centos7/Dockerfile | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/postgres/centos7/Dockerfile b/postgres/centos7/Dockerfile index 94ee5b8f..1997b527 100644 --- a/postgres/centos7/Dockerfile +++ b/postgres/centos7/Dockerfile @@ -3,28 +3,30 @@ # # Originally written for Fedora-Dockerfiles by # scollier -ENV PG11=https://download.postgresql.org/pub/repos/yum/11/redhat/rhel-7-x86_64/pgdg-centos11-11-2.noarch.rpm PG9.5=https://download.postgresql.org/pub/repos/yum/9.5/redhat/rhel-7-x86_64/pgdg-centos95-9.5-3.noarch.rpm +FROM centos:centos7 +ENV PG11=https://download.postgresql.org/pub/repos/yum/11/redhat/rhel-7-x86_64/pgdg-centos11-11-2.noarch.rpm +ENV PG9=https://download.postgresql.org/pub/repos/yum/9.5/redhat/rhel-7-x86_64/pgdg-centos95-9.5-3.noarch.rpm ENV PGPATH=/usr/pgsql-9.5 -FROM centos:centos7 +# MAINTAINER The CentOS Project RUN yum -y update \ && yum clean all \ - && yum -y install ${PG9.5} postgresql95 postgresql95-server postgresql95-contrib \ + && yum -y install ${PG9} postgresql95 postgresql95-server postgresql95-contrib rsync \ #RUN yum -y install sudo epel-release; yum clean all #RUN yum -y install postgresql-server postgresql postgresql-contrib supervisor pwgen; yum clean all -ADD ./postgresql-setup /usr/bin/postgresql-setup +ADD ./postgresql-setup ${PGPATH}/bin/postgresql-setup ADD ./supervisord.conf /etc/supervisord.conf ADD ./start_postgres.sh /start_postgres.sh #Sudo requires a tty. fix that. RUN sed -i 's/.*requiretty$/#Defaults requiretty/' /etc/sudoers -RUN chmod +x /usr/bin/postgresql-setup +RUN chmod +x ${PGPATH}/bin/postgresql-setup RUN chmod +x /start_postgres.sh -RUN /usr/bin/postgresql-setup initdb +RUN ${PGPATH}/bin/postgresql-setup initdb ADD ./postgresql.conf /var/lib/pgsql/data/postgresql.conf From 31b78d4185f593ab1d6559ec84c0eb28507adc61 Mon Sep 17 00:00:00 2001 From: AlbertChen Date: Fri, 26 Oct 2018 16:54:20 +0800 Subject: [PATCH 4/6] #33 add 9.5 --- postgres/centos7/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/postgres/centos7/Dockerfile b/postgres/centos7/Dockerfile index 1997b527..21e70e8b 100644 --- a/postgres/centos7/Dockerfile +++ b/postgres/centos7/Dockerfile @@ -30,7 +30,7 @@ RUN ${PGPATH}/bin/postgresql-setup initdb ADD ./postgresql.conf /var/lib/pgsql/data/postgresql.conf -RUN chown -v postgres.postgres /var/lib/pgsql/data/postgresql.conf +RUN chown -v postgres.postgres /var/lib/pgsql/9.5/data/postgresql.conf RUN echo "host all all 0.0.0.0/0 md5" >> /var/lib/pgsql/data/pg_hba.conf From 333a2b9048f8898d30a698dca51974cb455cdc3d Mon Sep 17 00:00:00 2001 From: AlbertChen Date: Fri, 26 Oct 2018 16:55:55 +0800 Subject: [PATCH 5/6] Revert "#33 add 9.5" This reverts commit 31b78d4185f593ab1d6559ec84c0eb28507adc61. --- postgres/centos7/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/postgres/centos7/Dockerfile b/postgres/centos7/Dockerfile index 21e70e8b..1997b527 100644 --- a/postgres/centos7/Dockerfile +++ b/postgres/centos7/Dockerfile @@ -30,7 +30,7 @@ RUN ${PGPATH}/bin/postgresql-setup initdb ADD ./postgresql.conf /var/lib/pgsql/data/postgresql.conf -RUN chown -v postgres.postgres /var/lib/pgsql/9.5/data/postgresql.conf +RUN chown -v postgres.postgres /var/lib/pgsql/data/postgresql.conf RUN echo "host all all 0.0.0.0/0 md5" >> /var/lib/pgsql/data/pg_hba.conf From c1b248ffc7f353cff175eb51983e6a7bba2c7ce5 Mon Sep 17 00:00:00 2001 From: AlbertChen Date: Fri, 26 Oct 2018 16:56:00 +0800 Subject: [PATCH 6/6] Revert "error fix" This reverts commit 077229338951264de18784a3f61d3a0e8751a7f4. --- postgres/centos7/Dockerfile | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/postgres/centos7/Dockerfile b/postgres/centos7/Dockerfile index 1997b527..94ee5b8f 100644 --- a/postgres/centos7/Dockerfile +++ b/postgres/centos7/Dockerfile @@ -3,30 +3,28 @@ # # Originally written for Fedora-Dockerfiles by # scollier -FROM centos:centos7 -ENV PG11=https://download.postgresql.org/pub/repos/yum/11/redhat/rhel-7-x86_64/pgdg-centos11-11-2.noarch.rpm -ENV PG9=https://download.postgresql.org/pub/repos/yum/9.5/redhat/rhel-7-x86_64/pgdg-centos95-9.5-3.noarch.rpm +ENV PG11=https://download.postgresql.org/pub/repos/yum/11/redhat/rhel-7-x86_64/pgdg-centos11-11-2.noarch.rpm PG9.5=https://download.postgresql.org/pub/repos/yum/9.5/redhat/rhel-7-x86_64/pgdg-centos95-9.5-3.noarch.rpm ENV PGPATH=/usr/pgsql-9.5 -# +FROM centos:centos7 MAINTAINER The CentOS Project RUN yum -y update \ && yum clean all \ - && yum -y install ${PG9} postgresql95 postgresql95-server postgresql95-contrib rsync \ + && yum -y install ${PG9.5} postgresql95 postgresql95-server postgresql95-contrib \ #RUN yum -y install sudo epel-release; yum clean all #RUN yum -y install postgresql-server postgresql postgresql-contrib supervisor pwgen; yum clean all -ADD ./postgresql-setup ${PGPATH}/bin/postgresql-setup +ADD ./postgresql-setup /usr/bin/postgresql-setup ADD ./supervisord.conf /etc/supervisord.conf ADD ./start_postgres.sh /start_postgres.sh #Sudo requires a tty. fix that. RUN sed -i 's/.*requiretty$/#Defaults requiretty/' /etc/sudoers -RUN chmod +x ${PGPATH}/bin/postgresql-setup +RUN chmod +x /usr/bin/postgresql-setup RUN chmod +x /start_postgres.sh -RUN ${PGPATH}/bin/postgresql-setup initdb +RUN /usr/bin/postgresql-setup initdb ADD ./postgresql.conf /var/lib/pgsql/data/postgresql.conf