postgres/Dockerfile

19 lines
379 B
Docker

FROM thallian/confd-env:latest
ENV PGDATA=/var/lib/postgresql/data
ENV S6_KEEP_ENV=1
RUN apk add --no-cache \
postgresql14 \
postgresql14-contrib
RUN mkdir -p /run/postgresql && mkdir -p $PGDATA
RUN chown -R postgres /run/postgresql && chown -R postgres $PGDATA
RUN chmod 775 /run/postgresql
ADD /rootfs /
VOLUME /var/lib/postgresql/data /etc/ssl/postgresql/
EXPOSE 5432