Skip to content

Commit

Permalink
Use jq's IN() instead of index()
Browse files Browse the repository at this point in the history
The end result is the same, but the construction is more ergonomic.
  • Loading branch information
tianon committed Oct 16, 2024
1 parent a37e929 commit 5db7a17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile-alpine.template
Original file line number Diff line number Diff line change
Expand Up @@ -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 -}}

Expand Down

0 comments on commit 5db7a17

Please sign in to comment.