From 15c0462dcd55f4d6ca7c57720903beca08b52665 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Wed, 16 Oct 2024 14:51:59 -0700 Subject: [PATCH] Use jq's `IN()` instead of `index()` The end result is the same, but the construction is more ergonomic. --- Dockerfile.debian | 2 +- Dockerfile.oracle | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile.debian b/Dockerfile.debian index 5df28c5bb..446179447 100644 --- a/Dockerfile.debian +++ b/Dockerfile.debian @@ -87,7 +87,7 @@ VOLUME /var/lib/mysql # Config files COPY config/ /etc/mysql/ COPY docker-entrypoint.sh /usr/local/bin/ -{{ if [ "8.0" ] | index(env.version) then ( -}} +{{ if env.version == "8.0" then ( -}} RUN ln -s usr/local/bin/docker-entrypoint.sh /entrypoint.sh # backwards compat {{ ) else "" end -}} ENTRYPOINT ["docker-entrypoint.sh"] diff --git a/Dockerfile.oracle b/Dockerfile.oracle index 15fcabcad..39ba41692 100644 --- a/Dockerfile.oracle +++ b/Dockerfile.oracle @@ -132,7 +132,7 @@ RUN set -eux; \ VOLUME /var/lib/mysql COPY docker-entrypoint.sh /usr/local/bin/ -{{ if [ "8.0" ] | index(env.version) then ( -}} +{{ if env.version == "8.0" then ( -}} RUN ln -s usr/local/bin/docker-entrypoint.sh /entrypoint.sh # backwards compat {{ ) else "" end -}} ENTRYPOINT ["docker-entrypoint.sh"]