From 09317fecc184ccbbb48f5ac9e8e2abbd4ac0a9f6 Mon Sep 17 00:00:00 2001 From: Erich Blume Date: Tue, 3 Feb 2026 17:11:25 -0800 Subject: [PATCH] Fix argocd CLI download in forgejo-runner image - Add -L flag to follow redirects - Add -f flag to fail on HTTP errors - Use dpkg --print-architecture as fallback for TARGETARCH - Verify binary works after download Co-Authored-By: Claude Opus 4.5 --- containers/forgejo-runner/Dockerfile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/containers/forgejo-runner/Dockerfile b/containers/forgejo-runner/Dockerfile index ebb3d59..9b71814 100644 --- a/containers/forgejo-runner/Dockerfile +++ b/containers/forgejo-runner/Dockerfile @@ -44,9 +44,12 @@ RUN curl -LsSf https://astral.sh/uv/install.sh | sh \ && mv /root/.local/bin/uvx /usr/local/bin/uvx # Install argocd CLI (for syncing apps from workflows) -RUN curl -sSL -o /usr/local/bin/argocd \ - "https://github.com/argoproj/argo-cd/releases/latest/download/argocd-linux-${TARGETARCH}" \ - && chmod +x /usr/local/bin/argocd +# Use dpkg --print-architecture as fallback since TARGETARCH may be empty in single-platform builds +RUN ARCH="${TARGETARCH:-$(dpkg --print-architecture)}" \ + && curl -fsSL -o /usr/local/bin/argocd \ + "https://github.com/argoproj/argo-cd/releases/latest/download/argocd-linux-${ARCH}" \ + && chmod +x /usr/local/bin/argocd \ + && argocd version --client # Default to bash CMD ["/bin/bash"]