22 lines
629 B
Docker
22 lines
629 B
Docker
FROM danielberteaud/postgres:15.24.3-2
|
|
MAINTAINER Daniel Berteaud <dbd@ehtrace.com>
|
|
|
|
ARG PATRONI_VERSION=3.2.2
|
|
|
|
ENV EDITOR=nano
|
|
|
|
USER root
|
|
RUN set -eux &&\
|
|
dnf -y update &&\
|
|
dnf -y install jq python3 python3-psycopg2 python3-pip nano zstd &&\
|
|
pip --no-cache-dir install patroni["consul"]==${PATRONI_VERSION} &&\
|
|
dnf -y clean all &&\
|
|
rm -rf /var/cache/yum/* /var/log/yum/* /tmp/pre.txt /tmp/post.txt /var/lib/dnf/history* &&\
|
|
# Remove pg-init and pg-conf from base image as patroni handle this \
|
|
rm -f /entrypoint.d/50-initdb.sh /entrypoint.d/60-pg-conf.sh
|
|
|
|
COPY root/ /
|
|
|
|
USER postgres
|
|
CMD ["patroni"]
|