From 6ea3058e66262f7a14633bddcecd5573948f524a Mon Sep 17 00:00:00 2001 From: C4illin Date: Wed, 4 Jun 2025 10:26:28 +0200 Subject: [PATCH] fix: change to baseline build issue: #311 --- Dockerfile | 16 ++++++++++++---- package.json | 2 +- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 295017c..2e111b2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,14 +3,22 @@ LABEL org.opencontainers.image.source="https://github.com/C4illin/ConvertX" WORKDIR /app # install bun -ENV BUN_INSTALL=/etc/.bun -ENV PATH=$BUN_INSTALL/bin:$PATH -ENV BUN_RUNTIME_TRANSPILER_CACHE_PATH=0 RUN apt-get update && apt-get install -y \ curl \ unzip \ && rm -rf /var/lib/apt/lists/* -RUN curl -fsSL https://bun.sh/install | bash -s "bun-v1.2.2" + +# if architecture is arm64, use the arm64 version of bun +RUN ARCH=$(uname -m) && \ + if [ "$ARCH" = "aarch64" ]; then \ + curl -fsSL -o bun-linux-aarch64.zip https://github.com/oven-sh/bun/releases/download/bun-v1.2.2/bun-linux-aarch64.zip; \ + else \ + curl -fsSL -o bun-linux-x64-baseline.zip https://github.com/oven-sh/bun/releases/download/bun-v1.2.2/bun-linux-x64-baseline.zip; \ + fi + +RUN unzip -j bun-linux-*.zip -d /usr/local/bin && \ + rm bun-linux-*.zip && \ + chmod +x /usr/local/bin/bun # install dependencies into temp directory # this will cache them and speed up future builds diff --git a/package.json b/package.json index c1ad50c..b079781 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "format": "run-p 'format:*'", "format:eslint": "eslint --fix .", "format:prettier": "prettier --write .", - "build": "bunx @tailwindcss/cli -i ./src/main.css -o ./public/generated.css", + "build": "bun x @tailwindcss/cli -i ./src/main.css -o ./public/generated.css", "lint": "run-p 'lint:*'", "lint:tsc": "tsc --noEmit", "lint:knip": "knip",