fix docker file bun
This commit is contained in:
24
Dockerfile
24
Dockerfile
@@ -28,17 +28,25 @@ RUN apt-get update \
|
|||||||
libssl-dev \
|
libssl-dev \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
RUN set -euo pipefail; \
|
RUN set -euxo pipefail; \
|
||||||
arch=$(uname -m); \
|
arch=$(uname -m); \
|
||||||
bun_arch=x64; \
|
bun_arch=x64; \
|
||||||
if [ "$arch" = "aarch64" ]; then bun_arch=arm64; fi; \
|
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" \
|
echo "Installing Bun ${BUN_VERSION} for ${bun_arch}..." && \
|
||||||
&& mkdir -p /opt/bun \
|
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" && \
|
||||||
&& unzip -q /tmp/bun-linux-$bun_arch.zip -d /opt/bun \
|
mkdir -p /opt/bun/bin && \
|
||||||
&& ln -sf /opt/bun/bun-linux-$bun_arch/bun /opt/bun/bin/bun \
|
unzip -o /tmp/bun-linux-$bun_arch.zip -d /tmp/bun-extract && \
|
||||||
&& ln -sf /opt/bun/bin/bun /usr/local/bin/bun \
|
if [ -f /tmp/bun-extract/bun ]; then \
|
||||||
&& rm -f /tmp/bun-linux-$bun_arch.zip \
|
mv /tmp/bun-extract/bun /opt/bun/bin/bun; \
|
||||||
&& bun --version
|
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 \
|
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" \
|
||||||
|
|||||||
Reference in New Issue
Block a user