From dde62a98e94ef4593d728c2ad7eb495c26c02593 Mon Sep 17 00:00:00 2001 From: southseact-3d Date: Tue, 10 Feb 2026 15:54:21 +0000 Subject: [PATCH] fix docker file bun --- Dockerfile | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 10220c6..ef10f1a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,17 +28,25 @@ RUN apt-get update \ libssl-dev \ && rm -rf /var/lib/apt/lists/* -RUN set -euo pipefail; \ +RUN set -euxo pipefail; \ arch=$(uname -m); \ bun_arch=x64; \ if [ "$arch" = "aarch64" ]; then bun_arch=arm64; fi; \ - curl -fsSL -o /tmp/bun-linux-$bun_arch.zip "https://github.com/oven-sh/bun/releases/download/bun-v${BUN_VERSION}/bun-linux-$bun_arch.zip" \ - && mkdir -p /opt/bun \ - && unzip -q /tmp/bun-linux-$bun_arch.zip -d /opt/bun \ - && ln -sf /opt/bun/bun-linux-$bun_arch/bun /opt/bun/bin/bun \ - && ln -sf /opt/bun/bin/bun /usr/local/bin/bun \ - && rm -f /tmp/bun-linux-$bun_arch.zip \ - && bun --version + echo "Installing Bun ${BUN_VERSION} for ${bun_arch}..." && \ + curl -fsSL -o /tmp/bun-linux-$bun_arch.zip "https://github.com/oven-sh/bun/releases/download/bun-v${BUN_VERSION}/bun-linux-$bun_arch.zip" && \ + mkdir -p /opt/bun/bin && \ + unzip -o /tmp/bun-linux-$bun_arch.zip -d /tmp/bun-extract && \ + if [ -f /tmp/bun-extract/bun ]; then \ + mv /tmp/bun-extract/bun /opt/bun/bin/bun; \ + elif [ -f /tmp/bun-extract/bun-linux-$bun_arch/bun ]; then \ + mv /tmp/bun-extract/bun-linux-$bun_arch/bun /opt/bun/bin/bun; \ + else \ + find /tmp/bun-extract -name "bun" -type f -exec mv {} /opt/bun/bin/bun \; ; \ + fi && \ + chmod +x /opt/bun/bin/bun && \ + ln -sf /opt/bun/bin/bun /usr/local/bin/bun && \ + rm -rf /tmp/bun-linux-$bun_arch.zip /tmp/bun-extract && \ + bun --version RUN curl -fsSL -o /tmp/powershell.tar.gz \ "https://github.com/PowerShell/PowerShell/releases/download/v${PWSH_VERSION}/powershell-${PWSH_VERSION}-linux-x64.tar.gz" \