From 5db7a178fdfa1042ddafc2d507fe830940463c79 Mon Sep 17 00:00:00 2001
From: Tianon Gravi <admwiggin@gmail.com>
Date: Wed, 16 Oct 2024 14:37:29 -0700
Subject: [PATCH] Use jq's `IN()` instead of `index()`

The end result is the same, but the construction is more ergonomic.
---
 Dockerfile-alpine.template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Dockerfile-alpine.template b/Dockerfile-alpine.template
index 3d6236e..767923f 100644
--- a/Dockerfile-alpine.template
+++ b/Dockerfile-alpine.template
@@ -38,7 +38,7 @@ RUN set -eux; \
 # verify that the binary works
 	gosu --version; \
 	gosu nobody true
-{{ if [ "12", "13", "14", "15", "16" ] | index(env.version) then ( -}}
+{{ if env.version | IN("12", "13", "14", "15", "16") then ( -}}
 RUN set -eux; ln -svf gosu /usr/local/bin/su-exec; su-exec nobody true # backwards compatibility (removed in PostgreSQL 17+)
 {{ ) else "" end -}}
 
-- 
GitLab