-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.alpine3.22
More file actions
22 lines (21 loc) · 907 Bytes
/
Dockerfile.alpine3.22
File metadata and controls
22 lines (21 loc) · 907 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
ARG POSTGRES_VERSION=17
FROM postgres:${POSTGRES_VERSION}-alpine3.22
ENV BUILD_DEPS="build-base git clang llvm lld"
RUN apk add --no-cache --virtual .build-deps ${BUILD_DEPS} && \
git clone --depth=1 https://github.com/citusdata/pg_cron /tmp/pg_cron && \
mkdir -p "/usr/lib/llvm19/bin"; \
for t in llvm-config clang clang++ llvm-ar llvm-ranlib llvm-lto; do \
if command -v "$t" >/dev/null 2>&1; then \
ln -sf "$(command -v "$t")" "/usr/lib/llvm19/bin/$t"; \
fi; \
done; \
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 && \
apk del .build-deps && \
echo "shared_preload_libraries = 'pg_cron'" >> /usr/local/share/postgresql/postgresql.conf.sample