From 670283512c996ee726ba233d7d711e06289b0252 Mon Sep 17 00:00:00 2001 From: I-am-PUID-0 <36779668+I-am-PUID-0@users.noreply.github.com> Date: Mon, 28 Oct 2024 18:59:09 -0400 Subject: [PATCH] Dockerfile --- Dockerfile | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6afc5ac..f2048c2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,16 +18,18 @@ RUN apk add --no-cache --virtual .build-deps \ FROM alpine:3.20 AS systemstats-builder RUN apk add --no-cache --virtual .build-deps \ - build-base postgresql-dev curl unzip && \ - curl -L https://github.com/EnterpriseDB/system_stats/archive/refs/heads/master.zip -o system_stats.zip && \ - unzip system_stats.zip && \ - cd system_stats-master && export PATH="/usr/bin:$PATH" && \ - make USE_PGXS=1 && make install USE_PGXS=1 && \ - mkdir -p /usr/share/postgresql16/extension && \ - cp system_stats.control /usr/share/postgresql16/extension/ && \ - cp system_stats--*.sql /usr/share/postgresql16/extension/ && \ - cd .. && rm -rf system_stats-master system_stats.zip && \ - apk del .build-deps + build-base postgresql-dev curl unzip jq && \ + RELEASE_TAG=$(curl -s https://api.github.com/repos/EnterpriseDB/system_stats/releases/latest | jq -r .tag_name) && \ + curl -L https://github.com/EnterpriseDB/system_stats/archive/refs/tags/$RELEASE_TAG.zip -o system_stats-latest.zip && \ + unzip system_stats-latest.zip && \ + mv system_stats-*/ system_stats && \ + cd system_stats && export PATH="/usr/bin:$PATH" && \ + make USE_PGXS=1 && make install USE_PGXS=1 && \ + mkdir -p /usr/share/postgresql16/extension && \ + cp system_stats.control /usr/share/postgresql16/extension/ && \ + cp system_stats--*.sql /usr/share/postgresql16/extension/ && \ + cd .. && rm -rf system_stats system_stats-latest.zip && \ + apk del .build-deps FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0-alpine3.19 AS zilean-builder ARG TARGETARCH