@@ -57,6 +57,7 @@ RUN ${PACKAGER} -y update && ${PACKAGER} -y install --nodocs --noplugins --setop
57
57
dumb-init \
58
58
libicu \
59
59
pgbackrest-${PGBACKREST_VERSION} \
60
+ cronie \
60
61
&& ${PACKAGER} -y clean all;
61
62
62
63
# install etcdctl
@@ -65,6 +66,7 @@ RUN curl -L https://github.com/coreos/etcd/releases/download/v${ETCD_VERSION}/et
65
66
ENV PATHBACKUP = $PATH
66
67
67
68
RUN wget https://smarden.org/runit/runit-2.1.2.tar.gz -P /package/
69
+ COPY cron_unprivileged.c /package/
68
70
69
71
# Install pam_oauth2.so
70
72
# RUN #git clone -b $PAM_OAUTH2 --recurse-submodules https://github.com/zalando-pg/pam-oauth2.git \
@@ -73,7 +75,12 @@ RUN wget https://smarden.org/runit/runit-2.1.2.tar.gz -P /package/
73
75
# && curl -sL https://github.com/zalando-pg/pg_auth_mon/archive/$PG_AUTH_MON_COMMIT.tar.gz | tar xz \
74
76
75
77
RUN pip3 install 'PyYAML<6.0' setuptools pystache loader kazoo meld3 boto python-etcd psutil requests cdiff ydiff --upgrade \
76
- && pip3 install patroni[kubernetes$EXTRAS]==$PATRONI_VERSION --upgrade \
78
+ && if [[ $PATRONI_VERSION == "multisite-" * ]]; then \
79
+ git clone -b $PATRONI_VERSION https://github.com/cybertec-postgresql/patroni; \
80
+ pip3 install ./patroni[kubernetes,etcd,etcd3]; \
81
+ else \
82
+ pip3 install patroni[kubernetes$EXTRAS]==$PATRONI_VERSION --upgrade; \
83
+ fi \
77
84
&& mkdir /usr/lib/postgresql \
78
85
&& git clone -b $PG_PERMISSIONS https://github.com/cybertec-postgresql/pg_permissions.git \
79
86
&& git clone -b $SET_USER https://github.com/pgaudit/set_user.git \
@@ -113,13 +120,14 @@ RUN pip3 install 'PyYAML<6.0' setuptools pystache loader kazoo meld3 boto python
113
120
done \
114
121
&& ${PACKAGER} -y install --nodocs --noplugins --setopt=install_weak_deps=0 glibc-static \
115
122
&& ${PACKAGER} -y clean all;
123
+ RUN gcc -s -shared -fPIC -o /usr/local/lib/cron_unprivileged.so /package/cron_unprivileged.c
116
124
117
125
RUN cd /package && tar -xvzf runit-2.1.2.tar.gz && rm runit-2.1.2.tar.gz \
118
126
&& cd admin/runit-2.1.2 && package/install \
119
127
&& ln -s /usr/local/bin/runsvdir /usr/bin/runsvdir \
120
128
&& rm -rf /pg_permissions /pgextwlist /pg_stat_kcache /pgnodemx /timescaledb /set_user /pam-oauth2 \
121
129
&& rm /etc/pgbackrest.conf && rm -rf /var/spool/pgbackrest \
122
- && ${PACKAGER} -y remove python3-pip python3-wheel python3-dev python3-setuptools git patchutils flatpak glibc-static gcc glibc-devel \
130
+ && ${PACKAGER} -y remove $(rpm -qa "*devel*" ) python3-pip python3-wheel python3-dev python3-setuptools git patchutils flatpak glibc-static gcc glibc-devel \
123
131
&& ${PACKAGER} -y autoremove \
124
132
&& ${PACKAGER} -y clean dbcache \
125
133
&& ${PACKAGER} -y clean all;
0 commit comments