containers-postgresql/Dockerfile
f 53c901224d
All checks were successful
ci/woodpecker/push/woodpecker/1 Pipeline was successful
ci/woodpecker/push/woodpecker/2 Pipeline was successful
ci/woodpecker/push/woodpecker/3 Pipeline was successful
ci/woodpecker/push/woodpecker/4 Pipeline was successful
Merge branch 'antifascista' of ssh://gitea.nulo.in:420/Sutty/containers-skel into antifascista
2024-06-21 13:09:16 -03:00

24 lines
782 B
Docker

ARG ALPINE_VERSION=3.18.3
ARG BASE_IMAGE=gitea.nulo.in/sutty/monit
FROM ${BASE_IMAGE}:${ALPINE_VERSION}
LABEL org.opencontainers.image.authors="f@sutty.nl"
ARG PG_VERSION=13
ARG PG_VERSION_APPENDED
ARG PG_VERSION_FULL
ENV PGVER=$PG_VERSION
ENV PGBASE=/var/lib/postgresql
ENV PGDATA=${PGBASE}/${PGVER}/data
ENV PAGER="less -niSFX"
# Starting from Alpine 3.15 there are several PostgreSQL versions
# supported.
RUN apk add --no-cache postgresql${PG_VERSION_APPENDED}~${PG_VERSION_FULL} postgresql${PG_VERSION_APPENDED}-contrib daemonize less
RUN install -dm 750 -o postgres -g postgres /etc/postgres.d
COPY ./monit.conf /etc/monit.d/postgresql.conf
COPY ./postgresqld.sh /usr/local/bin/postgresqld
COPY ./postgresql.conf /etc/postgres.d/postgresql.conf
EXPOSE 5432
VOLUME $PGBASE