mirror of
https://github.com/EpicMorg/docker-scripts.git
synced 2025-02-03 01:00:30 +03:00
PostrgresSQL 8.2, 8.3, 8.4, 9.0, 9.1, 9.2, 9.3, 9.4, 9.5, 9.6, 10, 11, 12
This commit is contained in:
parent
30174345bc
commit
ee9552deee
64
.travis.yml
64
.travis.yml
@ -132,7 +132,6 @@ matrix:
|
|||||||
- docker build --compress -t epicmorg/balancer:php balancer/php
|
- docker build --compress -t epicmorg/balancer:php balancer/php
|
||||||
- docker push epicmorg/balancer:php
|
- docker push epicmorg/balancer:php
|
||||||
|
|
||||||
##########
|
|
||||||
|
|
||||||
- name: Apache + PHP7.3
|
- name: Apache + PHP7.3
|
||||||
script:
|
script:
|
||||||
@ -146,6 +145,51 @@ matrix:
|
|||||||
- docker build --compress -t epicmorg/websites:php7.2 websites/php7.2
|
- docker build --compress -t epicmorg/websites:php7.2 websites/php7.2
|
||||||
- docker push epicmorg/websites:php7.2
|
- docker push epicmorg/websites:php7.2
|
||||||
|
|
||||||
|
##########
|
||||||
|
|
||||||
|
- name: PostgresSQL 8.2, 8.3, 8.4, 9.0, 9.1, 9.2, 9.3, 9.4, 9.5, 9.6, 10, 11, 12
|
||||||
|
script:
|
||||||
|
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
|
||||||
|
- docker build --compress -t epicmorg/postgres:8.2 postgres/8.2
|
||||||
|
- docker push epicmorg/postgres:8.2
|
||||||
|
|
||||||
|
- docker build --compress -t epicmorg/postgres:8.3 postgres/8.3
|
||||||
|
- docker push epicmorg/postgres:8.3
|
||||||
|
|
||||||
|
- docker build --compress -t epicmorg/postgres:8.4 postgres/8.4
|
||||||
|
- docker push epicmorg/postgres:8.4
|
||||||
|
|
||||||
|
- docker build --compress -t epicmorg/postgres:9.0 postgres/9.0
|
||||||
|
- docker push epicmorg/postgres:9.0
|
||||||
|
|
||||||
|
- docker build --compress -t epicmorg/postgres:9.1 postgres/9.1
|
||||||
|
- docker push epicmorg/postgres:9.1
|
||||||
|
|
||||||
|
- docker build --compress -t epicmorg/postgres:9.2 postgres/9.2
|
||||||
|
- docker push epicmorg/postgres:9.2
|
||||||
|
|
||||||
|
- docker build --compress -t epicmorg/postgres:9.3 postgres/9.3
|
||||||
|
- docker push epicmorg/postgres:9.3
|
||||||
|
|
||||||
|
- docker build --compress -t epicmorg/postgres:9.4 postgres/9.4
|
||||||
|
- docker push epicmorg/postgres:9.4
|
||||||
|
|
||||||
|
- docker build --compress -t epicmorg/postgres:9.5 postgres/9.5
|
||||||
|
- docker push epicmorg/postgres:9.5
|
||||||
|
|
||||||
|
- docker build --compress -t epicmorg/postgres:9.6 postgres/9.6
|
||||||
|
- docker push epicmorg/postgres:9.6
|
||||||
|
|
||||||
|
- docker build --compress -t epicmorg/postgres:10 postgres/10
|
||||||
|
- docker push epicmorg/postgres:10
|
||||||
|
|
||||||
|
- docker build --compress -t epicmorg/postgres:11 postgres/11
|
||||||
|
- docker push epicmorg/postgres:11
|
||||||
|
|
||||||
|
- docker build --compress -t epicmorg/postgres:12 postgres/12
|
||||||
|
- docker push epicmorg/postgres:12
|
||||||
|
|
||||||
|
|
||||||
##########
|
##########
|
||||||
|
|
||||||
- name: Bitbucket (latest)
|
- name: Bitbucket (latest)
|
||||||
@ -164,14 +208,18 @@ matrix:
|
|||||||
- docker build --compress -t epicmorg/confluence:latest-jdk11 -f atlassian/confluence/latest/Dockerfile.jdk11 atlassian/confluence/latest
|
- docker build --compress -t epicmorg/confluence:latest-jdk11 -f atlassian/confluence/latest/Dockerfile.jdk11 atlassian/confluence/latest
|
||||||
- docker push epicmorg/confluence:latest-jdk11
|
- docker push epicmorg/confluence:latest-jdk11
|
||||||
|
|
||||||
- name: Jira (latest)
|
|
||||||
script:
|
|
||||||
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
|
|
||||||
- docker build --compress -t epicmorg/jira:latest atlassian/jira/latest
|
- docker build --compress -t epicmorg/jira:latest atlassian/jira/latest
|
||||||
- docker push epicmorg/jira:latest
|
- docker push epicmorg/jira:latest
|
||||||
- docker build --compress -t epicmorg/jira:latest-jdk11 -f atlassian/jira/latest/Dockerfile.jdk11 atlassian/jira/latest
|
- docker build --compress -t epicmorg/jira:latest-jdk11 -f atlassian/jira/latest/Dockerfile.jdk11 atlassian/jira/latest
|
||||||
- docker push epicmorg/jira:latest-jdk11
|
- docker push epicmorg/jira:latest-jdk11
|
||||||
|
|
||||||
|
- name: Postgres (latest)
|
||||||
|
script:
|
||||||
|
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
|
||||||
|
- docker build --compress -t epicmorg/postgres:latest postgres/latest
|
||||||
|
- docker push epicmorg/postgres:latest
|
||||||
|
|
||||||
##########
|
##########
|
||||||
|
|
||||||
- name: qBitTorrent [latest + unstable + stable]
|
- name: qBitTorrent [latest + unstable + stable]
|
||||||
@ -1500,9 +1548,3 @@ matrix:
|
|||||||
#### Our minor priority images
|
#### Our minor priority images
|
||||||
#########################################
|
#########################################
|
||||||
|
|
||||||
- name: PostgresSQL 9.3
|
|
||||||
script:
|
|
||||||
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
|
|
||||||
- docker build --compress -t epicmorg/postgres:9.3 postgres/9.3
|
|
||||||
- docker push epicmorg/postgres:9.3
|
|
||||||
|
|
||||||
|
59
postgres/10/Dockerfile
Normal file
59
postgres/10/Dockerfile
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
FROM epicmorg/edge
|
||||||
|
LABEL maintainer="EpicMorg DevTeam, developer@epicm.org"
|
||||||
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
####################################################################################################################################
|
||||||
|
# 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 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.11/gosu-amd64' \
|
||||||
|
&& 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 apt-key adv --keyserver keyserver.ubuntu.com --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8
|
||||||
|
|
||||||
|
####################################################################################################################################
|
||||||
|
# http://apt.postgresql.org/pub/repos/apt/pool/10/p/postgresql-10/
|
||||||
|
####################################################################################################################################
|
||||||
|
ENV PG_MAJOR 10
|
||||||
|
|
||||||
|
RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ sid-pgdg main' $PG_MAJOR > /etc/apt/sources.list.d/pgdg.list && \
|
||||||
|
echo 'deb http://apt.postgresql.org/pub/repos/apt/ sid-pgdg-testing 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 \
|
||||||
|
postgresql-contrib-$PG_MAJOR \
|
||||||
|
&& 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"]
|
4
postgres/10/Makefile
Normal file
4
postgres/10/Makefile
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
all: pssql
|
||||||
|
pssql:
|
||||||
|
docker build --compress -t epicmorg/postgres:10 .
|
||||||
|
docker push epicmorg/postgres:10
|
24
postgres/10/docker-entrypoint.sh
Executable file
24
postgres/10/docker-entrypoint.sh
Executable file
@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [ "$1" = 'postgres' ]; then
|
||||||
|
chown -R postgres "$PGDATA"
|
||||||
|
|
||||||
|
if [ -z "$(ls -A "$PGDATA")" ]; then
|
||||||
|
gosu postgres initdb
|
||||||
|
|
||||||
|
sed -ri "s/^#(listen_addresses\s*=\s*)\S+/\1'*'/" "$PGDATA"/postgresql.conf
|
||||||
|
|
||||||
|
{ echo; echo 'host all all 0.0.0.0/0 trust'; } >> "$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 "$@"
|
59
postgres/11/Dockerfile
Normal file
59
postgres/11/Dockerfile
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
FROM epicmorg/edge
|
||||||
|
LABEL maintainer="EpicMorg DevTeam, developer@epicm.org"
|
||||||
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
####################################################################################################################################
|
||||||
|
# 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 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.11/gosu-amd64' \
|
||||||
|
&& 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 apt-key adv --keyserver keyserver.ubuntu.com --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8
|
||||||
|
|
||||||
|
####################################################################################################################################
|
||||||
|
# http://apt.postgresql.org/pub/repos/apt/pool/11/p/postgresql-11/
|
||||||
|
####################################################################################################################################
|
||||||
|
ENV PG_MAJOR 11
|
||||||
|
|
||||||
|
RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ sid-pgdg main' $PG_MAJOR > /etc/apt/sources.list.d/pgdg.list && \
|
||||||
|
echo 'deb http://apt.postgresql.org/pub/repos/apt/ sid-pgdg-testing 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 \
|
||||||
|
postgresql-contrib-$PG_MAJOR \
|
||||||
|
&& 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"]
|
4
postgres/11/Makefile
Normal file
4
postgres/11/Makefile
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
all: pssql
|
||||||
|
pssql:
|
||||||
|
docker build --compress -t epicmorg/postgres:11 .
|
||||||
|
docker push epicmorg/postgres:11
|
24
postgres/11/docker-entrypoint.sh
Executable file
24
postgres/11/docker-entrypoint.sh
Executable file
@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [ "$1" = 'postgres' ]; then
|
||||||
|
chown -R postgres "$PGDATA"
|
||||||
|
|
||||||
|
if [ -z "$(ls -A "$PGDATA")" ]; then
|
||||||
|
gosu postgres initdb
|
||||||
|
|
||||||
|
sed -ri "s/^#(listen_addresses\s*=\s*)\S+/\1'*'/" "$PGDATA"/postgresql.conf
|
||||||
|
|
||||||
|
{ echo; echo 'host all all 0.0.0.0/0 trust'; } >> "$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 "$@"
|
59
postgres/12/Dockerfile
Normal file
59
postgres/12/Dockerfile
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
FROM epicmorg/edge
|
||||||
|
LABEL maintainer="EpicMorg DevTeam, developer@epicm.org"
|
||||||
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
####################################################################################################################################
|
||||||
|
# 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 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.11/gosu-amd64' \
|
||||||
|
&& 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 apt-key adv --keyserver keyserver.ubuntu.com --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8
|
||||||
|
|
||||||
|
####################################################################################################################################
|
||||||
|
# http://apt.postgresql.org/pub/repos/apt/pool/12/p/postgresql-12/
|
||||||
|
####################################################################################################################################
|
||||||
|
ENV PG_MAJOR 12
|
||||||
|
|
||||||
|
RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ sid-pgdg main' $PG_MAJOR > /etc/apt/sources.list.d/pgdg.list && \
|
||||||
|
echo 'deb http://apt.postgresql.org/pub/repos/apt/ sid-pgdg-testing 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 \
|
||||||
|
postgresql-contrib-$PG_MAJOR \
|
||||||
|
&& 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"]
|
4
postgres/12/Makefile
Normal file
4
postgres/12/Makefile
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
all: pssql
|
||||||
|
pssql:
|
||||||
|
docker build --compress -t epicmorg/postgres:12 .
|
||||||
|
docker push epicmorg/postgres:12
|
24
postgres/12/docker-entrypoint.sh
Executable file
24
postgres/12/docker-entrypoint.sh
Executable file
@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [ "$1" = 'postgres' ]; then
|
||||||
|
chown -R postgres "$PGDATA"
|
||||||
|
|
||||||
|
if [ -z "$(ls -A "$PGDATA")" ]; then
|
||||||
|
gosu postgres initdb
|
||||||
|
|
||||||
|
sed -ri "s/^#(listen_addresses\s*=\s*)\S+/\1'*'/" "$PGDATA"/postgresql.conf
|
||||||
|
|
||||||
|
{ echo; echo 'host all all 0.0.0.0/0 trust'; } >> "$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 "$@"
|
59
postgres/8.2/Dockerfile
Normal file
59
postgres/8.2/Dockerfile
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
FROM epicmorg/edge
|
||||||
|
LABEL maintainer="EpicMorg DevTeam, developer@epicm.org"
|
||||||
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
####################################################################################################################################
|
||||||
|
# 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 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.11/gosu-amd64' \
|
||||||
|
&& 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 apt-key adv --keyserver keyserver.ubuntu.com --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8
|
||||||
|
|
||||||
|
####################################################################################################################################
|
||||||
|
# http://apt.postgresql.org/pub/repos/apt/pool/8.2/p/postgresql-8.2/
|
||||||
|
####################################################################################################################################
|
||||||
|
ENV PG_MAJOR 8.2
|
||||||
|
|
||||||
|
RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ sid-pgdg main' $PG_MAJOR > /etc/apt/sources.list.d/pgdg.list && \
|
||||||
|
echo 'deb http://apt.postgresql.org/pub/repos/apt/ sid-pgdg-testing 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 \
|
||||||
|
postgresql-contrib-$PG_MAJOR \
|
||||||
|
&& 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"]
|
5
postgres/8.2/Makefile
Normal file
5
postgres/8.2/Makefile
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
all: pssql
|
||||||
|
pssql:
|
||||||
|
docker build --compress -t epicmorg/postgres:8.2 .
|
||||||
|
docker push epicmorg/postgres:8.2
|
||||||
|
|
24
postgres/8.2/docker-entrypoint.sh
Executable file
24
postgres/8.2/docker-entrypoint.sh
Executable file
@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [ "$1" = 'postgres' ]; then
|
||||||
|
chown -R postgres "$PGDATA"
|
||||||
|
|
||||||
|
if [ -z "$(ls -A "$PGDATA")" ]; then
|
||||||
|
gosu postgres initdb
|
||||||
|
|
||||||
|
sed -ri "s/^#(listen_addresses\s*=\s*)\S+/\1'*'/" "$PGDATA"/postgresql.conf
|
||||||
|
|
||||||
|
{ echo; echo 'host all all 0.0.0.0/0 trust'; } >> "$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 "$@"
|
61
postgres/8.3/Dockerfile
Normal file
61
postgres/8.3/Dockerfile
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
FROM epicmorg/edge
|
||||||
|
LABEL maintainer="EpicMorg DevTeam, developer@epicm.org"
|
||||||
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
####################################################################################################################################
|
||||||
|
# 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 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.11/gosu-amd64' \
|
||||||
|
&& 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 apt-key adv --keyserver keyserver.ubuntu.com --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8
|
||||||
|
|
||||||
|
####################################################################################################################################
|
||||||
|
# http://apt.postgresql.org/pub/repos/apt/pool/8.3/p/postgresql-8.3/
|
||||||
|
####################################################################################################################################
|
||||||
|
ENV PG_MAJOR 8.3
|
||||||
|
ENV PG_VERSION 8.3
|
||||||
|
|
||||||
|
|
||||||
|
RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ sid-pgdg main' $PG_MAJOR > /etc/apt/sources.list.d/pgdg.list && \
|
||||||
|
echo 'deb http://apt.postgresql.org/pub/repos/apt/ sid-pgdg-testing 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 \
|
||||||
|
postgresql-contrib-$PG_MAJOR \
|
||||||
|
&& 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"]
|
5
postgres/8.3/Makefile
Normal file
5
postgres/8.3/Makefile
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
all: pssql
|
||||||
|
pssql:
|
||||||
|
docker build --compress -t epicmorg/postgres:8.3 .
|
||||||
|
docker push epicmorg/postgres:8.3
|
||||||
|
|
24
postgres/8.3/docker-entrypoint.sh
Executable file
24
postgres/8.3/docker-entrypoint.sh
Executable file
@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [ "$1" = 'postgres' ]; then
|
||||||
|
chown -R postgres "$PGDATA"
|
||||||
|
|
||||||
|
if [ -z "$(ls -A "$PGDATA")" ]; then
|
||||||
|
gosu postgres initdb
|
||||||
|
|
||||||
|
sed -ri "s/^#(listen_addresses\s*=\s*)\S+/\1'*'/" "$PGDATA"/postgresql.conf
|
||||||
|
|
||||||
|
{ echo; echo 'host all all 0.0.0.0/0 trust'; } >> "$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 "$@"
|
@ -1,37 +1,53 @@
|
|||||||
# vim:set ft=dockerfile:
|
FROM epicmorg/edge
|
||||||
FROM debian:wheezy
|
LABEL maintainer="EpicMorg DevTeam, developer@epicm.org"
|
||||||
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
####################################################################################################################################
|
||||||
# add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added
|
# 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
|
RUN groupadd -r postgres && useradd -r -g postgres postgres
|
||||||
|
|
||||||
|
####################################################################################################################################
|
||||||
# grab gosu for easy step-down from root
|
# grab gosu for easy step-down from root
|
||||||
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.1/gosu' \
|
|
||||||
&& chmod +x /usr/local/bin/gosu \
|
|
||||||
&& apt-get purge -y --auto-remove curl
|
|
||||||
|
|
||||||
|
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.11/gosu-amd64' \
|
||||||
|
&& 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
|
# 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/* \
|
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
|
&& localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
|
||||||
ENV LANG en_US.utf8
|
ENV LANG en_US.utf8
|
||||||
|
|
||||||
RUN apt-key adv --keyserver pgp.mit.edu --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8
|
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8
|
||||||
|
|
||||||
|
####################################################################################################################################
|
||||||
|
# http://apt.postgresql.org/pub/repos/apt/pool/8.4/p/postgresql-8.4/
|
||||||
|
####################################################################################################################################
|
||||||
ENV PG_MAJOR 8.4
|
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 echo 'deb http://apt.postgresql.org/pub/repos/apt/ sid-pgdg main' $PG_MAJOR > /etc/apt/sources.list.d/pgdg.list && \
|
||||||
|
echo 'deb http://apt.postgresql.org/pub/repos/apt/ sid-pgdg-testing main' $PG_MAJOR >> /etc/apt/sources.list.d/pgdg.list
|
||||||
|
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y postgresql-common \
|
&& apt-get install -y postgresql-common \
|
||||||
&& sed -ri 's/#(create_main_cluster) .*$/\1 = false/' /etc/postgresql-common/createcluster.conf \
|
&& sed -ri 's/#(create_main_cluster) .*$/\1 = false/' /etc/postgresql-common/createcluster.conf \
|
||||||
&& apt-get install -y \
|
&& apt-get install -y \
|
||||||
postgresql-$PG_MAJOR=$PG_VERSION \
|
postgresql-$PG_MAJOR \
|
||||||
postgresql-contrib-$PG_MAJOR=$PG_VERSION \
|
postgresql-contrib-$PG_MAJOR \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
RUN mkdir -p /var/run/postgresql && chown -R postgres /var/run/postgresql
|
RUN mkdir -p /var/run/postgresql && chown -R postgres /var/run/postgresql
|
||||||
|
|
||||||
|
|
||||||
ENV PATH /usr/lib/postgresql/$PG_MAJOR/bin:$PATH
|
ENV PATH /usr/lib/postgresql/$PG_MAJOR/bin:$PATH
|
||||||
ENV PGDATA /var/lib/postgresql/data
|
ENV PGDATA /var/lib/postgresql/data
|
||||||
VOLUME /var/lib/postgresql/data
|
VOLUME /var/lib/postgresql/data
|
||||||
@ -42,3 +58,4 @@ ENTRYPOINT ["/docker-entrypoint.sh"]
|
|||||||
|
|
||||||
EXPOSE 5432
|
EXPOSE 5432
|
||||||
CMD ["postgres"]
|
CMD ["postgres"]
|
||||||
|
|
||||||
|
5
postgres/8.4/Makefile
Normal file
5
postgres/8.4/Makefile
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
all: pssql
|
||||||
|
pssql:
|
||||||
|
docker build --compress -t epicmorg/postgres:8.4 .
|
||||||
|
docker push epicmorg/postgres:8.4
|
||||||
|
|
@ -1,37 +1,53 @@
|
|||||||
# vim:set ft=dockerfile:
|
FROM epicmorg/edge
|
||||||
FROM debian:wheezy
|
LABEL maintainer="EpicMorg DevTeam, developer@epicm.org"
|
||||||
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
####################################################################################################################################
|
||||||
# add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added
|
# 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
|
RUN groupadd -r postgres && useradd -r -g postgres postgres
|
||||||
|
|
||||||
|
####################################################################################################################################
|
||||||
# grab gosu for easy step-down from root
|
# grab gosu for easy step-down from root
|
||||||
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.1/gosu' \
|
|
||||||
&& chmod +x /usr/local/bin/gosu \
|
|
||||||
&& apt-get purge -y --auto-remove curl
|
|
||||||
|
|
||||||
|
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.11/gosu-amd64' \
|
||||||
|
&& 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
|
# 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/* \
|
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
|
&& localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
|
||||||
ENV LANG en_US.utf8
|
ENV LANG en_US.utf8
|
||||||
|
|
||||||
RUN apt-key adv --keyserver pgp.mit.edu --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8
|
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8
|
||||||
|
|
||||||
|
####################################################################################################################################
|
||||||
|
# http://apt.postgresql.org/pub/repos/apt/pool/9.0/p/postgresql-9.0/
|
||||||
|
####################################################################################################################################
|
||||||
ENV PG_MAJOR 9.0
|
ENV PG_MAJOR 9.0
|
||||||
ENV PG_VERSION 9.0.18-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 echo 'deb http://apt.postgresql.org/pub/repos/apt/ sid-pgdg main' $PG_MAJOR > /etc/apt/sources.list.d/pgdg.list && \
|
||||||
|
echo 'deb http://apt.postgresql.org/pub/repos/apt/ sid-pgdg-testing main' $PG_MAJOR >> /etc/apt/sources.list.d/pgdg.list
|
||||||
|
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y postgresql-common \
|
&& apt-get install -y postgresql-common \
|
||||||
&& sed -ri 's/#(create_main_cluster) .*$/\1 = false/' /etc/postgresql-common/createcluster.conf \
|
&& sed -ri 's/#(create_main_cluster) .*$/\1 = false/' /etc/postgresql-common/createcluster.conf \
|
||||||
&& apt-get install -y \
|
&& apt-get install -y \
|
||||||
postgresql-$PG_MAJOR=$PG_VERSION \
|
postgresql-$PG_MAJOR \
|
||||||
postgresql-contrib-$PG_MAJOR=$PG_VERSION \
|
postgresql-contrib-$PG_MAJOR \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
RUN mkdir -p /var/run/postgresql && chown -R postgres /var/run/postgresql
|
RUN mkdir -p /var/run/postgresql && chown -R postgres /var/run/postgresql
|
||||||
|
|
||||||
|
|
||||||
ENV PATH /usr/lib/postgresql/$PG_MAJOR/bin:$PATH
|
ENV PATH /usr/lib/postgresql/$PG_MAJOR/bin:$PATH
|
||||||
ENV PGDATA /var/lib/postgresql/data
|
ENV PGDATA /var/lib/postgresql/data
|
||||||
VOLUME /var/lib/postgresql/data
|
VOLUME /var/lib/postgresql/data
|
||||||
@ -42,3 +58,4 @@ ENTRYPOINT ["/docker-entrypoint.sh"]
|
|||||||
|
|
||||||
EXPOSE 5432
|
EXPOSE 5432
|
||||||
CMD ["postgres"]
|
CMD ["postgres"]
|
||||||
|
|
||||||
|
5
postgres/9.0/Makefile
Normal file
5
postgres/9.0/Makefile
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
all: pssql
|
||||||
|
pssql:
|
||||||
|
docker build --compress -t epicmorg/postgres:9.0 .
|
||||||
|
docker push epicmorg/postgres:9.0
|
||||||
|
|
@ -1,37 +1,53 @@
|
|||||||
# vim:set ft=dockerfile:
|
FROM epicmorg/edge
|
||||||
FROM debian:wheezy
|
LABEL maintainer="EpicMorg DevTeam, developer@epicm.org"
|
||||||
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
####################################################################################################################################
|
||||||
# add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added
|
# 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
|
RUN groupadd -r postgres && useradd -r -g postgres postgres
|
||||||
|
|
||||||
|
####################################################################################################################################
|
||||||
# grab gosu for easy step-down from root
|
# grab gosu for easy step-down from root
|
||||||
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.1/gosu' \
|
|
||||||
&& chmod +x /usr/local/bin/gosu \
|
|
||||||
&& apt-get purge -y --auto-remove curl
|
|
||||||
|
|
||||||
|
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.11/gosu-amd64' \
|
||||||
|
&& 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
|
# 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/* \
|
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
|
&& localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
|
||||||
ENV LANG en_US.utf8
|
ENV LANG en_US.utf8
|
||||||
|
|
||||||
RUN apt-key adv --keyserver pgp.mit.edu --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8
|
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8
|
||||||
|
|
||||||
|
####################################################################################################################################
|
||||||
|
# http://apt.postgresql.org/pub/repos/apt/pool/9.0/p/postgresql-9.0/
|
||||||
|
####################################################################################################################################
|
||||||
ENV PG_MAJOR 9.1
|
ENV PG_MAJOR 9.1
|
||||||
ENV PG_VERSION 9.1.14-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 echo 'deb http://apt.postgresql.org/pub/repos/apt/ sid-pgdg main' $PG_MAJOR > /etc/apt/sources.list.d/pgdg.list && \
|
||||||
|
echo 'deb http://apt.postgresql.org/pub/repos/apt/ sid-pgdg-testing main' $PG_MAJOR >> /etc/apt/sources.list.d/pgdg.list
|
||||||
|
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y postgresql-common \
|
&& apt-get install -y postgresql-common \
|
||||||
&& sed -ri 's/#(create_main_cluster) .*$/\1 = false/' /etc/postgresql-common/createcluster.conf \
|
&& sed -ri 's/#(create_main_cluster) .*$/\1 = false/' /etc/postgresql-common/createcluster.conf \
|
||||||
&& apt-get install -y \
|
&& apt-get install -y \
|
||||||
postgresql-$PG_MAJOR=$PG_VERSION \
|
postgresql-$PG_MAJOR \
|
||||||
postgresql-contrib-$PG_MAJOR=$PG_VERSION \
|
postgresql-contrib-$PG_MAJOR \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
RUN mkdir -p /var/run/postgresql && chown -R postgres /var/run/postgresql
|
RUN mkdir -p /var/run/postgresql && chown -R postgres /var/run/postgresql
|
||||||
|
|
||||||
|
|
||||||
ENV PATH /usr/lib/postgresql/$PG_MAJOR/bin:$PATH
|
ENV PATH /usr/lib/postgresql/$PG_MAJOR/bin:$PATH
|
||||||
ENV PGDATA /var/lib/postgresql/data
|
ENV PGDATA /var/lib/postgresql/data
|
||||||
VOLUME /var/lib/postgresql/data
|
VOLUME /var/lib/postgresql/data
|
||||||
@ -42,3 +58,4 @@ ENTRYPOINT ["/docker-entrypoint.sh"]
|
|||||||
|
|
||||||
EXPOSE 5432
|
EXPOSE 5432
|
||||||
CMD ["postgres"]
|
CMD ["postgres"]
|
||||||
|
|
||||||
|
5
postgres/9.1/Makefile
Normal file
5
postgres/9.1/Makefile
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
all: pssql
|
||||||
|
pssql:
|
||||||
|
docker build --compress -t epicmorg/postgres:9.1 .
|
||||||
|
docker push epicmorg/postgres:9.1
|
||||||
|
|
@ -1,37 +1,53 @@
|
|||||||
# vim:set ft=dockerfile:
|
FROM epicmorg/edge
|
||||||
FROM debian:wheezy
|
LABEL maintainer="EpicMorg DevTeam, developer@epicm.org"
|
||||||
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
####################################################################################################################################
|
||||||
# add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added
|
# 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
|
RUN groupadd -r postgres && useradd -r -g postgres postgres
|
||||||
|
|
||||||
|
####################################################################################################################################
|
||||||
# grab gosu for easy step-down from root
|
# grab gosu for easy step-down from root
|
||||||
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.1/gosu' \
|
|
||||||
&& chmod +x /usr/local/bin/gosu \
|
|
||||||
&& apt-get purge -y --auto-remove curl
|
|
||||||
|
|
||||||
|
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.11/gosu-amd64' \
|
||||||
|
&& 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
|
# 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/* \
|
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
|
&& localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
|
||||||
ENV LANG en_US.utf8
|
ENV LANG en_US.utf8
|
||||||
|
|
||||||
RUN apt-key adv --keyserver pgp.mit.edu --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8
|
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8
|
||||||
|
|
||||||
|
####################################################################################################################################
|
||||||
|
# http://apt.postgresql.org/pub/repos/apt/pool/9.2/p/postgresql-9.2/
|
||||||
|
####################################################################################################################################
|
||||||
ENV PG_MAJOR 9.2
|
ENV PG_MAJOR 9.2
|
||||||
ENV PG_VERSION 9.2.9-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 echo 'deb http://apt.postgresql.org/pub/repos/apt/ sid-pgdg main' $PG_MAJOR > /etc/apt/sources.list.d/pgdg.list && \
|
||||||
|
echo 'deb http://apt.postgresql.org/pub/repos/apt/ sid-pgdg-testing main' $PG_MAJOR >> /etc/apt/sources.list.d/pgdg.list
|
||||||
|
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y postgresql-common \
|
&& apt-get install -y postgresql-common \
|
||||||
&& sed -ri 's/#(create_main_cluster) .*$/\1 = false/' /etc/postgresql-common/createcluster.conf \
|
&& sed -ri 's/#(create_main_cluster) .*$/\1 = false/' /etc/postgresql-common/createcluster.conf \
|
||||||
&& apt-get install -y \
|
&& apt-get install -y \
|
||||||
postgresql-$PG_MAJOR=$PG_VERSION \
|
postgresql-$PG_MAJOR \
|
||||||
postgresql-contrib-$PG_MAJOR=$PG_VERSION \
|
postgresql-contrib-$PG_MAJOR \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
RUN mkdir -p /var/run/postgresql && chown -R postgres /var/run/postgresql
|
RUN mkdir -p /var/run/postgresql && chown -R postgres /var/run/postgresql
|
||||||
|
|
||||||
|
|
||||||
ENV PATH /usr/lib/postgresql/$PG_MAJOR/bin:$PATH
|
ENV PATH /usr/lib/postgresql/$PG_MAJOR/bin:$PATH
|
||||||
ENV PGDATA /var/lib/postgresql/data
|
ENV PGDATA /var/lib/postgresql/data
|
||||||
VOLUME /var/lib/postgresql/data
|
VOLUME /var/lib/postgresql/data
|
||||||
@ -42,3 +58,4 @@ ENTRYPOINT ["/docker-entrypoint.sh"]
|
|||||||
|
|
||||||
EXPOSE 5432
|
EXPOSE 5432
|
||||||
CMD ["postgres"]
|
CMD ["postgres"]
|
||||||
|
|
||||||
|
5
postgres/9.2/Makefile
Normal file
5
postgres/9.2/Makefile
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
all: pssql
|
||||||
|
pssql:
|
||||||
|
docker build --compress -t epicmorg/postgres:9.0 .
|
||||||
|
docker push epicmorg/postgres:9.0
|
||||||
|
|
@ -32,17 +32,16 @@ RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys B97B0AFCAA1A47F044F
|
|||||||
# http://apt.postgresql.org/pub/repos/apt/pool/9.3/p/postgresql-9.3/
|
# http://apt.postgresql.org/pub/repos/apt/pool/9.3/p/postgresql-9.3/
|
||||||
####################################################################################################################################
|
####################################################################################################################################
|
||||||
ENV PG_MAJOR 9.3
|
ENV PG_MAJOR 9.3
|
||||||
ENV PG_VERSION 9.3.25-3.pgdg+1
|
|
||||||
|
|
||||||
RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ sid-pgdg main' $PG_MAJOR > /etc/apt/sources.list.d/pgdg.list && \
|
RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ sid-pgdg main' $PG_MAJOR > /etc/apt/sources.list.d/pgdg.list && \
|
||||||
echo 'deb http://apt.postgresql.org/pub/repos/apt/ sid-pgdg-testing main' $PG_MAJOR >> /etc/apt/sources.list.d/pgdg.lis
|
echo 'deb http://apt.postgresql.org/pub/repos/apt/ sid-pgdg-testing main' $PG_MAJOR >> /etc/apt/sources.list.d/pgdg.list
|
||||||
|
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y postgresql-common \
|
&& apt-get install -y postgresql-common \
|
||||||
&& sed -ri 's/#(create_main_cluster) .*$/\1 = false/' /etc/postgresql-common/createcluster.conf \
|
&& sed -ri 's/#(create_main_cluster) .*$/\1 = false/' /etc/postgresql-common/createcluster.conf \
|
||||||
&& apt-get install -y \
|
&& apt-get install -y \
|
||||||
postgresql-$PG_MAJOR=$PG_VERSION \
|
postgresql-$PG_MAJOR \
|
||||||
postgresql-contrib-$PG_MAJOR=$PG_VERSION \
|
postgresql-contrib-$PG_MAJOR \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
RUN mkdir -p /var/run/postgresql && chown -R postgres /var/run/postgresql
|
RUN mkdir -p /var/run/postgresql && chown -R postgres /var/run/postgresql
|
||||||
|
@ -1,37 +1,52 @@
|
|||||||
# vim:set ft=dockerfile:
|
FROM epicmorg/edge
|
||||||
FROM debian:wheezy
|
LABEL maintainer="EpicMorg DevTeam, developer@epicm.org"
|
||||||
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
####################################################################################################################################
|
||||||
# add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added
|
# 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
|
RUN groupadd -r postgres && useradd -r -g postgres postgres
|
||||||
|
|
||||||
|
####################################################################################################################################
|
||||||
# grab gosu for easy step-down from root
|
# grab gosu for easy step-down from root
|
||||||
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.1/gosu' \
|
|
||||||
&& chmod +x /usr/local/bin/gosu \
|
|
||||||
&& apt-get purge -y --auto-remove curl
|
|
||||||
|
|
||||||
|
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.11/gosu-amd64' \
|
||||||
|
&& 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
|
# 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/* \
|
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
|
&& localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
|
||||||
ENV LANG en_US.utf8
|
ENV LANG en_US.utf8
|
||||||
|
|
||||||
RUN apt-key adv --keyserver pgp.mit.edu --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8
|
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8
|
||||||
|
|
||||||
|
####################################################################################################################################
|
||||||
|
# http://apt.postgresql.org/pub/repos/apt/pool/9.4/p/postgresql-9.4/
|
||||||
|
####################################################################################################################################
|
||||||
ENV PG_MAJOR 9.4
|
ENV PG_MAJOR 9.4
|
||||||
ENV PG_VERSION 9.4~beta2-2~129.bzr487.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 echo 'deb http://apt.postgresql.org/pub/repos/apt/ sid-pgdg main' $PG_MAJOR > /etc/apt/sources.list.d/pgdg.list && \
|
||||||
|
echo 'deb http://apt.postgresql.org/pub/repos/apt/ sid-pgdg-testing main' $PG_MAJOR >> /etc/apt/sources.list.d/pgdg.list
|
||||||
|
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y postgresql-common \
|
&& apt-get install -y postgresql-common \
|
||||||
&& sed -ri 's/#(create_main_cluster) .*$/\1 = false/' /etc/postgresql-common/createcluster.conf \
|
&& sed -ri 's/#(create_main_cluster) .*$/\1 = false/' /etc/postgresql-common/createcluster.conf \
|
||||||
&& apt-get install -y \
|
&& apt-get install -y \
|
||||||
postgresql-$PG_MAJOR=$PG_VERSION \
|
postgresql-$PG_MAJOR \
|
||||||
postgresql-contrib-$PG_MAJOR=$PG_VERSION \
|
postgresql-contrib-$PG_MAJOR \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
RUN mkdir -p /var/run/postgresql && chown -R postgres /var/run/postgresql
|
RUN mkdir -p /var/run/postgresql && chown -R postgres /var/run/postgresql
|
||||||
|
|
||||||
|
|
||||||
ENV PATH /usr/lib/postgresql/$PG_MAJOR/bin:$PATH
|
ENV PATH /usr/lib/postgresql/$PG_MAJOR/bin:$PATH
|
||||||
ENV PGDATA /var/lib/postgresql/data
|
ENV PGDATA /var/lib/postgresql/data
|
||||||
VOLUME /var/lib/postgresql/data
|
VOLUME /var/lib/postgresql/data
|
||||||
|
4
postgres/9.4/Makefile
Normal file
4
postgres/9.4/Makefile
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
all: pssql
|
||||||
|
pssql:
|
||||||
|
docker build --compress -t epicmorg/postgres:9.4 .
|
||||||
|
docker push epicmorg/postgres:9.4
|
59
postgres/9.5/Dockerfile
Normal file
59
postgres/9.5/Dockerfile
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
FROM epicmorg/edge
|
||||||
|
LABEL maintainer="EpicMorg DevTeam, developer@epicm.org"
|
||||||
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
####################################################################################################################################
|
||||||
|
# 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 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.11/gosu-amd64' \
|
||||||
|
&& 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 apt-key adv --keyserver keyserver.ubuntu.com --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8
|
||||||
|
|
||||||
|
####################################################################################################################################
|
||||||
|
# http://apt.postgresql.org/pub/repos/apt/pool/9.4/p/postgresql-9.4/
|
||||||
|
####################################################################################################################################
|
||||||
|
ENV PG_MAJOR 9.5
|
||||||
|
|
||||||
|
RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ sid-pgdg main' $PG_MAJOR > /etc/apt/sources.list.d/pgdg.list && \
|
||||||
|
echo 'deb http://apt.postgresql.org/pub/repos/apt/ sid-pgdg-testing 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 \
|
||||||
|
postgresql-contrib-$PG_MAJOR \
|
||||||
|
&& 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"]
|
4
postgres/9.5/Makefile
Normal file
4
postgres/9.5/Makefile
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
all: pssql
|
||||||
|
pssql:
|
||||||
|
docker build --compress -t epicmorg/postgres:9.5 .
|
||||||
|
docker push epicmorg/postgres:9.5
|
24
postgres/9.5/docker-entrypoint.sh
Executable file
24
postgres/9.5/docker-entrypoint.sh
Executable file
@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [ "$1" = 'postgres' ]; then
|
||||||
|
chown -R postgres "$PGDATA"
|
||||||
|
|
||||||
|
if [ -z "$(ls -A "$PGDATA")" ]; then
|
||||||
|
gosu postgres initdb
|
||||||
|
|
||||||
|
sed -ri "s/^#(listen_addresses\s*=\s*)\S+/\1'*'/" "$PGDATA"/postgresql.conf
|
||||||
|
|
||||||
|
{ echo; echo 'host all all 0.0.0.0/0 trust'; } >> "$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 "$@"
|
59
postgres/9.6/Dockerfile
Normal file
59
postgres/9.6/Dockerfile
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
FROM epicmorg/edge
|
||||||
|
LABEL maintainer="EpicMorg DevTeam, developer@epicm.org"
|
||||||
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
####################################################################################################################################
|
||||||
|
# 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 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.11/gosu-amd64' \
|
||||||
|
&& 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 apt-key adv --keyserver keyserver.ubuntu.com --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8
|
||||||
|
|
||||||
|
####################################################################################################################################
|
||||||
|
# http://apt.postgresql.org/pub/repos/apt/pool/9.6/p/postgresql-9.6/
|
||||||
|
####################################################################################################################################
|
||||||
|
ENV PG_MAJOR 9.6
|
||||||
|
|
||||||
|
RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ sid-pgdg main' $PG_MAJOR > /etc/apt/sources.list.d/pgdg.list && \
|
||||||
|
echo 'deb http://apt.postgresql.org/pub/repos/apt/ sid-pgdg-testing 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 \
|
||||||
|
postgresql-contrib-$PG_MAJOR \
|
||||||
|
&& 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"]
|
4
postgres/9.6/Makefile
Normal file
4
postgres/9.6/Makefile
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
all: pssql
|
||||||
|
pssql:
|
||||||
|
docker build --compress -t epicmorg/postgres:9.6 .
|
||||||
|
docker push epicmorg/postgres:9.6
|
24
postgres/9.6/docker-entrypoint.sh
Executable file
24
postgres/9.6/docker-entrypoint.sh
Executable file
@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [ "$1" = 'postgres' ]; then
|
||||||
|
chown -R postgres "$PGDATA"
|
||||||
|
|
||||||
|
if [ -z "$(ls -A "$PGDATA")" ]; then
|
||||||
|
gosu postgres initdb
|
||||||
|
|
||||||
|
sed -ri "s/^#(listen_addresses\s*=\s*)\S+/\1'*'/" "$PGDATA"/postgresql.conf
|
||||||
|
|
||||||
|
{ echo; echo 'host all all 0.0.0.0/0 trust'; } >> "$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 "$@"
|
59
postgres/latest/Dockerfile
Normal file
59
postgres/latest/Dockerfile
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
FROM epicmorg/edge
|
||||||
|
LABEL maintainer="EpicMorg DevTeam, developer@epicm.org"
|
||||||
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
####################################################################################################################################
|
||||||
|
# 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 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.11/gosu-amd64' \
|
||||||
|
&& 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 apt-key adv --keyserver keyserver.ubuntu.com --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8
|
||||||
|
|
||||||
|
####################################################################################################################################
|
||||||
|
# http://apt.postgresql.org/pub/repos/apt/pool/12/p/postgresql-12/
|
||||||
|
####################################################################################################################################
|
||||||
|
ENV PG_MAJOR 12
|
||||||
|
|
||||||
|
RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ sid-pgdg main' $PG_MAJOR > /etc/apt/sources.list.d/pgdg.list && \
|
||||||
|
echo 'deb http://apt.postgresql.org/pub/repos/apt/ sid-pgdg-testing 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 \
|
||||||
|
postgresql-contrib-$PG_MAJOR \
|
||||||
|
&& 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"]
|
4
postgres/latest/Makefile
Normal file
4
postgres/latest/Makefile
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
all: pssql
|
||||||
|
pssql:
|
||||||
|
docker build --compress -t epicmorg/postgres:latest .
|
||||||
|
docker push epicmorg/postgres:latest
|
24
postgres/latest/docker-entrypoint.sh
Executable file
24
postgres/latest/docker-entrypoint.sh
Executable file
@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [ "$1" = 'postgres' ]; then
|
||||||
|
chown -R postgres "$PGDATA"
|
||||||
|
|
||||||
|
if [ -z "$(ls -A "$PGDATA")" ]; then
|
||||||
|
gosu postgres initdb
|
||||||
|
|
||||||
|
sed -ri "s/^#(listen_addresses\s*=\s*)\S+/\1'*'/" "$PGDATA"/postgresql.conf
|
||||||
|
|
||||||
|
{ echo; echo 'host all all 0.0.0.0/0 trust'; } >> "$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 "$@"
|
Loading…
x
Reference in New Issue
Block a user