Skip to content

Commit 38b3c10

Browse files
authored
Merge pull request #1345 from infosiftr/conditional-jit
Only install 18+ JIT package on architectures where it's supported
2 parents 6ec0e42 + 46e8474 commit 38b3c10

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

18/bookworm/Dockerfile

Lines changed: 4 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

18/bullseye/Dockerfile

Lines changed: 4 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Dockerfile-debian.template

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,11 +154,13 @@ RUN set -ex; \
154154
sed -ri 's/#(create_main_cluster) .*$/\1 = false/' /etc/postgresql-common/createcluster.conf; \
155155
apt-get install -y --no-install-recommends \
156156
"postgresql-$PG_MAJOR=$PG_VERSION" \
157+
; \
157158
{{ if .major >= 18 then ( -}}
158-
# https://github.com/docker-library/postgres/pull/1344#issuecomment-2936578203 (JIT is a separate package in 18+)
159-
"postgresql-$PG_MAJOR-jit=$PG_VERSION" \
159+
# https://github.com/docker-library/postgres/pull/1344#issuecomment-2936578203 (JIT is a separate package in 18+, but only supported for a subset of architectures)
160+
if apt-get install -s "postgresql-$PG_MAJOR-jit" > /dev/null 2>&1; then \
161+
apt-get install -y --no-install-recommends "postgresql-$PG_MAJOR-jit=$PG_VERSION"; \
162+
fi; \
160163
{{ ) else "" end -}}
161-
; \
162164
\
163165
rm -rf /var/lib/apt/lists/*; \
164166
\

0 commit comments

Comments
 (0)