Simplify Bun installation using npm

This commit is contained in:
southseact-3d
2026-02-10 16:01:21 +00:00
parent eed249f869
commit 0860fc0028

View File

@@ -28,19 +28,7 @@ RUN apt-get update \
libssl-dev \ libssl-dev \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
RUN set -euxo pipefail; \ RUN npm install -g bun@${BUN_VERSION} && bun --version
arch=$(uname -m); \
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-${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-${target}.zip /tmp/bun-extract && \
bun --version
RUN curl -fsSL -o /tmp/powershell.tar.gz \ 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" \ "https://github.com/PowerShell/PowerShell/releases/download/v${PWSH_VERSION}/powershell-${PWSH_VERSION}-linux-x64.tar.gz" \