Simplify Bun installation using npm
This commit is contained in:
14
Dockerfile
14
Dockerfile
@@ -28,19 +28,7 @@ RUN apt-get update \
|
||||
libssl-dev \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN set -euxo pipefail; \
|
||||
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 npm install -g bun@${BUN_VERSION} && 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" \
|
||||
|
||||
Reference in New Issue
Block a user