Public | Automated Build

Last pushed: a month ago
Dockerfile
FROM debian:jessie ARG DOCKERIZE_VERSION=v0.2.0 ARG POSTGRES_CLIENT_VERSION=9.6 ARG PGPOOL_VERSION=3.3.4\* RUN groupadd -r postgres --gid=999 && useradd -r -g postgres -d /home/postgres --uid=999 postgres # grab gosu for easy step-down from root ARG GOSU_VERSION=1.7 RUN set -x \ && apt-get update && apt-get install -y --no-install-recommends ca-certificates wget && rm -rf /var/lib/apt/lists/* \ && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \ && wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \ && export GNUPGHOME="$(mktemp -d)" \ && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \ && rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc \ && chmod +x /usr/local/bin/gosu \ && gosu nobody true RUN wget -q https://www.postgresql.org/media/keys/ACCC4CF8.asc -O - | apt-key add - && \ sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main" >> /etc/apt/sources.list.d/pgdg.list' && \ apt-get update RUN apt-get install -y libffi-dev libssl-dev postgresql-client-$POSTGRES_CLIENT_VERSION libpgpool0=$PGPOOL_VERSION pgpool2=$PGPOOL_VERSION openssh-server RUN wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz && \ tar -C /usr/local/bin -xzvf dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz COPY ./ssh /home/postgres/.ssh COPY ./pgpool/bin /usr/local/bin/pgpool COPY ./pgpool/configs /var/pgpool_configs RUN chmod +x -R /usr/local/bin/pgpool ENV CHECK_USER replication_user ENV CHECK_PASSWORD replication_pass ENV CHECK_PGCONNECT_TIMEOUT 10 ENV WAIT_BACKEND_TIMEOUT 120 ENV REQUIRE_MIN_BACKENDS 0 ENV SSH_ENABLE 0 ENV NOTVISIBLE "in users profile" EXPOSE 22 EXPOSE 5432 EXPOSE 9898 HEALTHCHECK --interval=1m --timeout=10s --retries=5 \ CMD /usr/local/bin/pgpool/has_write_node.sh CMD ["/usr/local/bin/pgpool/entrypoint.sh"]
Source Repository