Skip to content

Commit ff2f581

Browse files
fix(image): use bun baseline build for non-AVX2 CPUs
The default bun-linux-x64 asset requires AVX2 and crashes with "Illegal instruction" on runner CPUs without it. Switch to the bun-linux-x64-baseline asset, which is compiled for older x86_64 CPUs (no AVX2) and works on every runner. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 49caf2f commit ff2f581

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

Containerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,14 +117,15 @@ RUN curl -sSL -o /tmp/node.tgz \
117117
&& rm -f /tmp/node.tgz
118118

119119
# Install Bun (JS runtime, package manager, bundler, test runner)
120+
# Use the baseline build to support runner CPUs without AVX2.
120121
ARG BUN_VERSION=1.3.14
121122
RUN curl -sSL -o /tmp/bun.zip \
122-
"https://github.com/oven-sh/bun/releases/download/bun-v${BUN_VERSION}/bun-linux-x64.zip" \
123+
"https://github.com/oven-sh/bun/releases/download/bun-v${BUN_VERSION}/bun-linux-x64-baseline.zip" \
123124
&& unzip -q /tmp/bun.zip -d /tmp \
124-
&& mv /tmp/bun-linux-x64/bun /usr/local/bin/bun \
125+
&& mv /tmp/bun-linux-x64-baseline/bun /usr/local/bin/bun \
125126
&& chmod +x /usr/local/bin/bun \
126127
&& ln -sf /usr/local/bin/bun /usr/local/bin/bunx \
127-
&& rm -rf /tmp/bun.zip /tmp/bun-linux-x64
128+
&& rm -rf /tmp/bun.zip /tmp/bun-linux-x64-baseline
128129

129130
# Install pre-commit
130131
# hadolint ignore=DL3013

0 commit comments

Comments
 (0)