From 544dfeabb8f3e5fa90535cdb8671b58ffe05e7d2 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Thu, 4 Jun 2015 14:38:23 -0700 Subject: [PATCH] Remove 8.4 (EOL) See http://www.postgresql.org/support/versioning/ -- it's been EOL since July 2014. --- 8.4/Dockerfile | 50 --------------------------- 8.4/docker-entrypoint.sh | 73 ---------------------------------------- 2 files changed, 123 deletions(-) delete mode 100644 8.4/Dockerfile delete mode 100755 8.4/docker-entrypoint.sh diff --git a/8.4/Dockerfile b/8.4/Dockerfile deleted file mode 100644 index 43178ec1a2..0000000000 --- a/8.4/Dockerfile +++ /dev/null @@ -1,50 +0,0 @@ -# vim:set ft=dockerfile: -FROM debian:wheezy - -# add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added -RUN groupadd -r postgres && useradd -r -g postgres postgres - -# grab gosu for easy step-down from root -RUN gpg --keyserver pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 -RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/* \ - && curl -o /usr/local/bin/gosu -SL "https://github.com/tianon/gosu/releases/download/1.2/gosu-$(dpkg --print-architecture)" \ - && curl -o /usr/local/bin/gosu.asc -SL "https://github.com/tianon/gosu/releases/download/1.2/gosu-$(dpkg --print-architecture).asc" \ - && gpg --verify /usr/local/bin/gosu.asc \ - && rm /usr/local/bin/gosu.asc \ - && chmod +x /usr/local/bin/gosu \ - && apt-get purge -y --auto-remove curl - -# make the "en_US.UTF-8" locale so postgres will be utf-8 enabled by default -RUN apt-get update && apt-get install -y locales && rm -rf /var/lib/apt/lists/* \ - && localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 -ENV LANG en_US.utf8 - -RUN mkdir /docker-entrypoint-initdb.d - -RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8 - -ENV PG_MAJOR 8.4 -ENV PG_VERSION 8.4.22-1.pgdg70+1 - -RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ wheezy-pgdg main' $PG_MAJOR > /etc/apt/sources.list.d/pgdg.list - -RUN apt-get update \ - && apt-get install -y postgresql-common \ - && sed -ri 's/#(create_main_cluster) .*$/\1 = false/' /etc/postgresql-common/createcluster.conf \ - && apt-get install -y \ - postgresql-$PG_MAJOR=$PG_VERSION \ - postgresql-contrib-$PG_MAJOR=$PG_VERSION \ - && rm -rf /var/lib/apt/lists/* - -RUN mkdir -p /var/run/postgresql && chown -R postgres /var/run/postgresql - -ENV PATH /usr/lib/postgresql/$PG_MAJOR/bin:$PATH -ENV PGDATA /var/lib/postgresql/data -VOLUME /var/lib/postgresql/data - -COPY docker-entrypoint.sh / - -ENTRYPOINT ["/docker-entrypoint.sh"] - -EXPOSE 5432 -CMD ["postgres"] diff --git a/8.4/docker-entrypoint.sh b/8.4/docker-entrypoint.sh deleted file mode 100755 index 27c98d2147..0000000000 --- a/8.4/docker-entrypoint.sh +++ /dev/null @@ -1,73 +0,0 @@ -#!/bin/bash -set -e - -if [ "$1" = 'postgres' ]; then - chown -R postgres "$PGDATA" - - chmod g+s /run/postgresql - chown -R postgres:postgres /run/postgresql - - if [ -z "$(ls -A "$PGDATA")" ]; then - gosu postgres initdb - - sed -ri "s/^#(listen_addresses\s*=\s*)\S+/\1'*'/" "$PGDATA"/postgresql.conf - - # check password first so we can ouptut the warning before postgres - # messes it up - if [ "$POSTGRES_PASSWORD" ]; then - pass="PASSWORD '$POSTGRES_PASSWORD'" - authMethod=md5 - else - # The - option suppresses leading tabs but *not* spaces. :) - cat >&2 <<-'EOWARN' - **************************************************** - WARNING: No password has been set for the database. - This will allow anyone with access to the - Postgres port to access your database. In - Docker's default configuration, this is - effectively any other container on the same - system. - - Use "-e POSTGRES_PASSWORD=password" to set - it in "docker run". - **************************************************** - EOWARN - - pass= - authMethod=trust - fi - - : ${POSTGRES_USER:=postgres} - : ${POSTGRES_DB:=$POSTGRES_USER} - - if [ "$POSTGRES_DB" != 'postgres' ]; then - gosu postgres postgres --single -jE <<-EOSQL - CREATE DATABASE "$POSTGRES_DB" ; - EOSQL - echo - fi - - if [ "$POSTGRES_USER" = 'postgres' ]; then - op='ALTER' - else - op='CREATE' - fi - - gosu postgres postgres --single -jE <<-EOSQL - $op USER "$POSTGRES_USER" WITH SUPERUSER $pass ; - EOSQL - echo - - { echo; echo "host all all 0.0.0.0/0 $authMethod"; } >> "$PGDATA"/pg_hba.conf - - if [ -d /docker-entrypoint-initdb.d ]; then - for f in /docker-entrypoint-initdb.d/*.sh; do - [ -f "$f" ] && . "$f" - done - fi - fi - - exec gosu postgres "$@" -fi - -exec "$@"