Skip to content

Commit 908e91c

Browse files
authored
Merge pull request #312 from C4illin/fix/311/use-baseline-build
2 parents f1c5cd9 + 6ea3058 commit 908e91c

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

Dockerfile

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,22 @@ LABEL org.opencontainers.image.source="https://github.com/C4illin/ConvertX"
33
WORKDIR /app
44

55
# install bun
6-
ENV BUN_INSTALL=/etc/.bun
7-
ENV PATH=$BUN_INSTALL/bin:$PATH
8-
ENV BUN_RUNTIME_TRANSPILER_CACHE_PATH=0
96
RUN apt-get update && apt-get install -y \
107
curl \
118
unzip \
129
&& rm -rf /var/lib/apt/lists/*
13-
RUN curl -fsSL https://bun.sh/install | bash -s "bun-v1.2.2"
10+
11+
# if architecture is arm64, use the arm64 version of bun
12+
RUN ARCH=$(uname -m) && \
13+
if [ "$ARCH" = "aarch64" ]; then \
14+
curl -fsSL -o bun-linux-aarch64.zip https://github.com/oven-sh/bun/releases/download/bun-v1.2.2/bun-linux-aarch64.zip; \
15+
else \
16+
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; \
17+
fi
18+
19+
RUN unzip -j bun-linux-*.zip -d /usr/local/bin && \
20+
rm bun-linux-*.zip && \
21+
chmod +x /usr/local/bin/bun
1422

1523
# install dependencies into temp directory
1624
# this will cache them and speed up future builds

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"format": "run-p 'format:*'",
88
"format:eslint": "eslint --fix .",
99
"format:prettier": "prettier --write .",
10-
"build": "bunx @tailwindcss/cli -i ./src/main.css -o ./public/generated.css",
10+
"build": "bun x @tailwindcss/cli -i ./src/main.css -o ./public/generated.css",
1111
"lint": "run-p 'lint:*'",
1212
"lint:tsc": "tsc --noEmit",
1313
"lint:knip": "knip",

0 commit comments

Comments
 (0)