gvadocker/pgsql/Dockerfile

19 lines
494 B
Docker

FROM debian:buster
LABEL maintainer "Jan Dittberner <jan@dittberner.info>"
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
dumb-init \
postgresql \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*.*
EXPOSE 5432
VOLUME /var/lib/postgresql/
COPY pg_hba.conf /etc/postgresql/11/main/pg_hba.conf
COPY startup.sh /srv/
HEALTHCHECK CMD su postgres -c 'pg_isready -d postgres'
ENTRYPOINT ["dumb-init"]
CMD "/srv/startup.sh"