Files
postgresrepmgr/Dockerfile
Bernhard Radermacher 5789d99781 fix
2026-02-23 09:39:03 +01:00

28 lines
825 B
Docker

FROM postgres:15
RUN apt-get update && \
apt-get install -y --no-install-recommends \
postgresql-$PG_MAJOR-repmgr \
&& \
rm -rf /var/lib/apt/lists/*
RUN install --verbose --directory --owner postgres --group postgres --mode 1777 /etc/repmgr
VOLUME /etc/repmgr
RUN apt-get update && \
apt-get install -y --no-install-recommends \
openssh-server \
&& \
rm -rf /var/lib/apt/lists/* && \
mkdir -p /var/lib/postgresql/.ssh && \
chmod 700 /var/lib/postgresql/.ssh && \
chown postgres: /var/lib/postgresql/.ssh
COPY --chmod=644 --chown=postgres profile /var/lib/postgresql/.profile
COPY --chmod=600 --chown=postgres authorized_keys id_ed25519 /var/lib/postgresql/.ssh/
COPY --chmod=755 entrypoint.sh /usr/local/bin/
ENTRYPOINT ["entrypoint.sh"]