fix: use if-then-fi for duf arch mapping to not break arm64 build

This commit is contained in:
luochen570
2026-07-14 23:27:02 +08:00
parent 0976909e65
commit 9068c3eb02

View File

@@ -23,7 +23,7 @@ RUN apk add --no-cache \
ARG TARGETARCH ARG TARGETARCH
ARG DUF_VERSION=0.9.1 ARG DUF_VERSION=0.9.1
RUN DUF_ARCH="${TARGETARCH}" \ RUN DUF_ARCH="${TARGETARCH}" \
&& [ "${DUF_ARCH}" = "amd64" ] && DUF_ARCH="x86_64" \ && if [ "${DUF_ARCH}" = "amd64" ]; then DUF_ARCH="x86_64"; fi \
&& curl -fsSL "https://github.com/muesli/duf/releases/download/v${DUF_VERSION}/duf_${DUF_VERSION}_linux_${DUF_ARCH}.tar.gz" \ && curl -fsSL "https://github.com/muesli/duf/releases/download/v${DUF_VERSION}/duf_${DUF_VERSION}_linux_${DUF_ARCH}.tar.gz" \
| tar xz -C /usr/local/bin duf | tar xz -C /usr/local/bin duf