Files
postgresrepmgr/Dockerfile

28 lines
825 B
Docker
Raw Normal View History

2026-02-20 09:50:23 +01:00
FROM postgres:15
2026-02-18 10:24:06 +01:00
2026-02-23 09:33:59 +01:00
2026-02-20 09:50:23 +01:00
RUN apt-get update && \
apt-get install -y --no-install-recommends \
postgresql-$PG_MAJOR-repmgr \
&& \
rm -rf /var/lib/apt/lists/*
2026-02-18 10:24:06 +01:00
2026-02-20 15:07:41 +01:00
RUN install --verbose --directory --owner postgres --group postgres --mode 1777 /etc/repmgr
VOLUME /etc/repmgr
2026-02-23 09:33:59 +01:00
RUN apt-get update && \
apt-get install -y --no-install-recommends \
openssh-server \
&& \
2026-02-23 09:39:03 +01:00
rm -rf /var/lib/apt/lists/* && \
mkdir -p /var/lib/postgresql/.ssh && \
chmod 700 /var/lib/postgresql/.ssh && \
2026-02-23 09:33:59 +01:00
chown postgres: /var/lib/postgresql/.ssh
2026-02-20 11:06:41 +01:00
COPY --chmod=644 --chown=postgres profile /var/lib/postgresql/.profile
2026-02-23 09:36:21 +01:00
COPY --chmod=600 --chown=postgres authorized_keys id_ed25519 /var/lib/postgresql/.ssh/
2026-02-20 17:51:31 +01:00
COPY --chmod=755 entrypoint.sh /usr/local/bin/
ENTRYPOINT ["entrypoint.sh"]