2023-08-24 14:50:53 +00:00
|
|
|
ARG ALPINE_VERSION=3.18.3
|
|
|
|
ARG BASE_IMAGE=gitea.nulo.in/sutty/monit
|
2021-10-03 23:19:00 +00:00
|
|
|
FROM ${BASE_IMAGE}:${ALPINE_VERSION}
|
2024-06-21 15:21:51 +00:00
|
|
|
LABEL org.opencontainers.image.authors="f@sutty.nl"
|
2022-03-04 01:43:25 +00:00
|
|
|
ARG PG_VERSION=13
|
|
|
|
ARG PG_VERSION_APPENDED
|
2023-08-16 15:54:24 +00:00
|
|
|
ARG PG_VERSION_FULL
|
2019-09-24 17:04:19 +00:00
|
|
|
|
2022-03-04 01:43:25 +00:00
|
|
|
ENV PGVER=$PG_VERSION
|
|
|
|
ENV PGBASE=/var/lib/postgresql
|
|
|
|
ENV PGDATA=${PGBASE}/${PGVER}/data
|
|
|
|
ENV PAGER="less -niSFX"
|
2019-09-24 17:04:19 +00:00
|
|
|
|
2022-03-04 01:43:25 +00:00
|
|
|
# Starting from Alpine 3.15 there are several PostgreSQL versions
|
|
|
|
# supported.
|
2023-08-16 15:54:24 +00:00
|
|
|
RUN apk add --no-cache postgresql${PG_VERSION_APPENDED}~${PG_VERSION_FULL} postgresql${PG_VERSION_APPENDED}-contrib daemonize less
|
2022-03-04 01:43:25 +00:00
|
|
|
RUN install -dm 750 -o postgres -g postgres /etc/postgres.d
|
2019-09-24 17:04:19 +00:00
|
|
|
|
|
|
|
COPY ./monit.conf /etc/monit.d/postgresql.conf
|
2022-03-04 01:43:25 +00:00
|
|
|
COPY ./postgresqld.sh /usr/local/bin/postgresqld
|
|
|
|
COPY ./postgresql.conf /etc/postgres.d/postgresql.conf
|
2019-09-24 17:04:19 +00:00
|
|
|
|
|
|
|
EXPOSE 5432
|
2019-09-24 17:29:43 +00:00
|
|
|
VOLUME $PGBASE
|