Skip to content

Commit 1add939

Browse files
committed
Dockerfiles updated + Makefile
1 parent a29a46e commit 1add939

File tree

6 files changed

+18
-19
lines changed

6 files changed

+18
-19
lines changed

Makefile

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@ IMAGE_REPOSITORY ?= docker.io
77
IMAGE_PATH ?= cybertec-pg-container
88
CONTAINERSUITE ?= cybertec-pg-container
99
PGVERSION ?= 17
10-
PGVERSION_FULL ?= 17.0
10+
PGVERSION_FULL ?= 17.4
1111
OLD_PG_VERSIONS ?= 13 14 15 16
1212
PATRONI_VERSION ?= multisite-4.0.2.1
13-
PGBACKREST_VERSION ?= 2.53
13+
PGBACKREST_VERSION ?= 2.54.2
1414
POSTGIS_VERSION ?= 34
15-
ETCD_VERSION ?= 3.5.15
15+
ETCD_VERSION ?= 3.5.18
16+
PGBOUNCER_VERSION ?= 1.24
1617
PACKAGER ?= dnf
17-
BUILD ?= 2
18+
BUILD ?= 1
1819
ARCH ?= amd64
1920
IMAGE_TAG ?= $(BASEOS)-$(PGVERSION_FULL)-$(BUILD)
2021
POSTGIS_IMAGE_TAG ?= $(BASEOS)-$(PGVERSION_FULL)-$(POSTGIS_VERSION)-$(BUILD)
@@ -143,12 +144,13 @@ pgbouncer-build:
143144
--build-arg PACKAGER=$(PACKAGER) \
144145
--build-arg CONTAINERSUITE=$(CONTAINERSUITE) \
145146
--build-arg BUILD=$(BUILD) \
147+
--build-arg PGBOUNCER_VERSION=${PGBOUNCER_VERSION} \
146148
--build-arg PGVERSION=$(PGVERSION)
147149

148150
pgbouncer: pgbouncer-build
149151

150152
exporter-build:
151-
docker build $(ROOTPATH) \
153+
docker build $(ROOTPATH) --no-cache \
152154
--file $(ROOTPATH)/docker/exporter/Dockerfile \
153155
--tag cybertec-pg-container/exporter:$(IMAGE_TAG) \
154156
--build-arg BASE_IMAGE=$(BASE_IMAGE) \

docker/exporter/Dockerfile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,10 @@ RUN ${PACKAGER} -y install --nodocs \
1515
make \
1616
&& ${PACKAGER} -y clean all ;
1717

18-
RUN wget https://go.dev/dl/go1.23.0.linux-amd64.tar.gz && tar -xzf go1.23.0.linux-amd64.tar.gz && mv go /usr/local
18+
RUN wget https://go.dev/dl/go1.23.6.linux-amd64.tar.gz && tar -xzf go1.23.6.linux-amd64.tar.gz && mv go /usr/local
1919
ENV PATH=$PATH:/usr/local/go/bin
2020

21-
RUN git clone https://github.com/prometheus-community/postgres_exporter.git && cd postgres_exporter \
22-
# fix for pg17
23-
&& git fetch origin pull/1072/head:pr-pg17 && git fetch origin pull/1072/head:pr-pg17 && git merge pr-pg17 \
24-
&& make build;
21+
RUN git clone https://github.com/cybertec-postgresql/postgres_exporter.git && cd postgres_exporter && make build;
2522

2623
FROM ${CONTAINERIMAGE}
2724
COPY --from=builder /usr/bin/dumb-init /usr/bin/dumb-init

docker/pgbackrest/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,6 @@ VOLUME ["sshd", "/home/postgres/pgdata", "/backrestrepo"]
154154

155155
ENTRYPOINT ["/scripts/nss_wrapper/nss_wrapper.sh"]
156156

157-
USER 26
157+
USER postgres
158158

159159
CMD ["dumb-init", "/launch.sh", "init"]

docker/pgbouncer/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@ ARG CONTAINERIMAGE
66
FROM ${CONTAINERSUITE}/base:${BASEOS}-${BUILD} AS builder
77

88
ARG PACKAGER
9+
ARG PGBOUNCER_VERSION
910

1011
RUN ${PACKAGER} -y install --nodocs \
1112
--setopt=skip_missing_names_on_install=False \
1213
dumb-init \
13-
pgbouncer \
14+
"pgbouncer-${PGBOUNCER_VERSION}.*" \
1415
&& ${PACKAGER} -y autoremove \
1516
&& ${PACKAGER} -y clean dbcache \
1617
&& ${PACKAGER} -y clean all;

docker/postgres-gis/Dockerfile

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ COPY cron_unprivileged.c /package/
7474
#&& curl -sL https://github.com/zalando-pg/bg_mon/archive/$BG_MON_COMMIT.tar.gz | tar xz \
7575
#&& curl -sL https://github.com/zalando-pg/pg_auth_mon/archive/$PG_AUTH_MON_COMMIT.tar.gz | tar xz \
7676

77-
RUN pip3 install 'PyYAML<6.0' setuptools pystache loader kazoo meld3 boto python-etcd psutil requests cdiff ydiff --upgrade \
77+
RUN pip3 install 'PyYAML<6.0' setuptools pystache loader kazoo meld3 boto python-etcd psutil requests cdiff ydiff==1.3 --upgrade \
7878
&& if [[ $PATRONI_VERSION == "multisite-"* ]]; then \
7979
git clone -b $PATRONI_VERSION https://github.com/cybertec-postgresql/patroni; \
8080
pip3 install ./patroni[kubernetes,etcd,etcd3]; \
@@ -126,9 +126,8 @@ RUN pip3 install 'PyYAML<6.0' setuptools pystache loader kazoo meld3 boto python
126126
&& cd admin/runit-2.1.2 && package/install \
127127
&& ln -s /usr/local/bin/runsvdir /usr/bin/runsvdir \
128128
&& rm -rf /pg_permissions /pgextwlist /pg_stat_kcache /pgnodemx /timescaledb /set_user /pam-oauth2 \
129-
&& rm /etc/pgbackrest.conf && rm -rf /var/spool/pgbackrest;
130-
131-
RUN ${PACKAGER} -y remove $(rpm -qa "*devel*") python3-pip python3-wheel python3-dev python3-setuptools git patchutils flatpak glibc-static gcc glibc-devel --exclude libgeotiff17-devel --exclude libtiff-devel --exclude libspatialite50-devel \
129+
&& rm /etc/pgbackrest.conf && rm -rf /var/spool/pgbackrest \
130+
&& ${PACKAGER} -y remove $(rpm -qa "*devel*") python3-pip python3-wheel python3-dev python3-setuptools git patchutils flatpak glibc-static gcc glibc-devel --exclude libgeotiff17-devel --exclude libtiff-devel --exclude libspatialite50-devel \
132131
&& ${PACKAGER} -y autoremove \
133132
&& ${PACKAGER} -y clean dbcache \
134133
&& ${PACKAGER} -y clean all;
@@ -205,6 +204,6 @@ COPY launcher/postgres/launch.sh /
205204

206205
ENTRYPOINT ["/scripts/nss_wrapper/nss_wrapper.sh"]
207206

208-
USER 26
207+
USER postgres
209208

210209
CMD ["/bin/sh", "/launch.sh", "init"]

docker/postgres/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ COPY cron_unprivileged.c /package/
7373
#&& curl -sL https://github.com/zalando-pg/bg_mon/archive/$BG_MON_COMMIT.tar.gz | tar xz \
7474
#&& curl -sL https://github.com/zalando-pg/pg_auth_mon/archive/$PG_AUTH_MON_COMMIT.tar.gz | tar xz \
7575

76-
RUN pip3 install 'PyYAML<6.0' setuptools pystache loader kazoo meld3 boto python-etcd psutil requests cdiff ydiff --upgrade \
76+
RUN pip3 install 'PyYAML<6.0' setuptools pystache loader kazoo meld3 boto python-etcd psutil requests cdiff ydiff==1.3 --upgrade \
7777
&& if [[ $PATRONI_VERSION == "multisite-"* ]]; then \
7878
git clone -b $PATRONI_VERSION https://github.com/cybertec-postgresql/patroni; \
7979
pip3 install ./patroni[kubernetes,etcd,etcd3]; \
@@ -201,6 +201,6 @@ COPY launcher/postgres/launch.sh /
201201

202202
ENTRYPOINT ["/scripts/nss_wrapper/nss_wrapper.sh"]
203203

204-
USER 26
204+
USER postgres
205205

206206
CMD ["/bin/sh", "/launch.sh", "init"]

0 commit comments

Comments
 (0)