Skip to content

Commit

Permalink
fix dockerfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
nhudson committed Feb 5, 2024
1 parent d97584d commit 7202ddd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
6 changes: 3 additions & 3 deletions standard-cnpg/Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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; \
Expand Down
8 changes: 5 additions & 3 deletions tembo-pg-slim/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down Expand Up @@ -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"]

0 comments on commit 7202ddd

Please sign in to comment.