diff --git a/standard-cnpg/Dockerfile b/standard-cnpg/Dockerfile index 4127bcd..01650e3 100644 --- a/standard-cnpg/Dockerfile +++ b/standard-cnpg/Dockerfile @@ -1,7 +1,7 @@ ARG PG_VERSION=15 ARG TAG=latest -FROM rust:1.75-bookworm as builder +FROM rust:1.70-bookworm as builder ARG TRUNK_VER=0.12.19 @@ -80,10 +80,10 @@ RUN set -xe; \ rm -rf /var/lib/apt/lists/*; # Install pg_stat_statements -RUN trunk install pg_stat_statements +RUN /usr/bin/trunk install pg_stat_statements # Install auto_explain -RUN trunk install auto_explain +RUN /usr/bin/trunk install auto_explain # cache pg_stat_statements and auto_explain and pg_stat_kcache to temp directory RUN set -eux; \ diff --git a/tembo-pg-slim/Dockerfile b/tembo-pg-slim/Dockerfile index 310440b..c493e1a 100644 --- a/tembo-pg-slim/Dockerfile +++ b/tembo-pg-slim/Dockerfile @@ -73,9 +73,9 @@ RUN set -eux; \ WORKDIR postgresql-${PG_RELEASE} ENV CFLAGS "-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer" ENV LDFLAGS "-Wl,-z,relro -Wl,-z,now" -RUN ./configure --prefix=/usr/lib/postgresql/${PG_MAJOR} \ +RUN ./configure --prefix=/usr/lib/postgresql/${PG_VERSION} \ --datarootdir=${ALTDIR} \ - --libdir=${ALTDIR}/${PG_MAJOR}/lib \ + --libdir=${ALTDIR}/${PG_VERSION}/lib \ --with-perl \ --with-python \ --with-tcl \ @@ -103,12 +103,14 @@ RUN make -j$(nproc) RUN make install RUN cd .. && rm postgresql-${PG_RELEASE}.tar.bz2 +WORKDIR / +RUN rm -rf /postgresql-${PG_RELEASE} + # Remove pre-installed pg_config RUN rm /usr/bin/pg_config RUN mkdir -p /var/run/postgresql && chmod 775 /var/run/postgresql RUN mkdir -p /usr/share/postgresql/${PG_MAJOR}/extension && chmod 775 /usr/share/postgresql/${PG_MAJOR}/extension - USER postgres CMD ["postgres"]