Fix Bun installation URL and architecture detection

This commit is contained in:
southseact-3d
2026-02-10 15:56:57 +00:00
parent dde62a98e9
commit eed249f869

View File

@@ -30,22 +30,16 @@ RUN apt-get update \
RUN set -euxo pipefail; \
arch=$(uname -m); \
bun_arch=x64; \
if [ "$arch" = "aarch64" ]; then bun_arch=arm64; fi; \
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" && \
target=linux-x64; \
if [ "$arch" = "aarch64" ] || [ "$arch" = "arm64" ]; then target=linux-aarch64; fi; \
echo "Installing Bun ${BUN_VERSION} for ${target}..." && \
curl -fsSL --retry 3 --retry-delay 2 -o /tmp/bun-${target}.zip "https://github.com/oven-sh/bun/releases/download/bun-v${BUN_VERSION}/bun-${target}.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 && \
unzip -o /tmp/bun-${target}.zip -d /tmp/bun-extract && \
mv /tmp/bun-extract/bun-${target}/bun /opt/bun/bin/bun && \
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 && \
rm -rf /tmp/bun-${target}.zip /tmp/bun-extract && \
bun --version
RUN curl -fsSL -o /tmp/powershell.tar.gz \