-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.trixie
More file actions
23 lines (22 loc) · 947 Bytes
/
Dockerfile.trixie
File metadata and controls
23 lines (22 loc) · 947 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
ARG POSTGRES_VERSION=17
FROM postgres:${POSTGRES_VERSION}-trixie
ARG POSTGRES_VERSION
ENV POSTGRES_VERSION=${POSTGRES_VERSION}
ENV BUILD_DEPS="build-essential git clang llvm lld postgresql-server-dev-${POSTGRES_VERSION}"
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y ${BUILD_DEPS} && \
git clone --depth=1 https://github.com/citusdata/pg_cron /tmp/pg_cron && \
mkdir -p /usr/local/share/postgresql/ && \
make -C /tmp/pg_cron \
CLANG="$(command -v clang)" \
LLVM_CONFIG="$(command -v llvm-config)" \
LLVM_AR="$(command -v llvm-ar)" \
LLVM_RANLIB="$(command -v llvm-ranlib)" \
LLVM_LTO="$(command -v llvm-lto)" && \
make -C /tmp/pg_cron install && \
rm -rf /tmp/pg_cron && \
apt-get remove -y ${BUILD_DEPS} && \
apt-get autoremove -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
echo "shared_preload_libraries = 'pg_cron'" >> /usr/local/share/postgresql/postgresql.conf.sample