[build from src] "bun install" Failed in Docker with version 26.1.4 #5265

Open
opened 2026-02-16 17:50:42 -05:00 by yindo · 0 comments
Owner

Originally created by @inv1s10n on GitHub (Jan 13, 2026).

Originally assigned to: @thdxr on GitHub.

Description

I tried to build opencode from src in docker with version 26.1.4, but failed.
Then I tried the same Dockerfile with version 29.1.3, it succeed.
But I always need build opencode in old docker version.
I found the docker image from ghcr.io/anomalyco/opencode can run nomally in all docker versions.
I want to know how to build opencode successfully in older verion.

Plugins

No response

OpenCode version

latest source code

Steps to reproduce

This is my Dockerfile:

FROM oven/bun:1-debian

RUN apt-get update && apt-get install -y
build-essential
curl
wget
git
pkg-config
libssl-dev

WORKDIR /opencode

RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"

RUN git clone https://github.com/sst/opencode.git .

RUN bun install

error log:
Resolved, downloaded, and extracted [333]
error: failed applying patch file: EINVAL: Invalid argument (read())
error: failed to patch package: ghostty-web@0.3.0
error: Cannot find module '../' from '/tmp/bunx-6-node-gypatest/node_modules/.bin/node-gyp'
Bun v1.3.6(Linux x64 baseline)
error: install script from "tree-sitter-bash" exited with 1
The command /bin/sh -c bun install returned a non-zero code: 1

Screenshot and/or share link

No response

Operating System

Centos 7 (virtual machine)

Terminal

No response

Originally created by @inv1s10n on GitHub (Jan 13, 2026). Originally assigned to: @thdxr on GitHub. ### Description I tried to build opencode from src in docker with version 26.1.4, but failed. Then I tried the same Dockerfile with version 29.1.3, it succeed. But I always need build opencode in old docker version. I found the docker image from ghcr.io/anomalyco/opencode can run nomally in all docker versions. I want to know how to build opencode successfully in older verion. ### Plugins _No response_ ### OpenCode version latest source code ### Steps to reproduce This is my Dockerfile: FROM oven/bun:1-debian RUN apt-get update && apt-get install -y \ build-essential \ curl \ wget \ git \ pkg-config \ libssl-dev WORKDIR /opencode RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y ENV PATH="/root/.cargo/bin:${PATH}" RUN git clone https://github.com/sst/opencode.git . RUN bun install error log: Resolved, downloaded, and extracted [333] error: failed applying patch file: EINVAL: Invalid argument (read()) error: failed to patch package: ghostty-web@0.3.0 error: Cannot find module '../' from '/tmp/bunx-6-node-gypatest/node_modules/.bin/node-gyp' Bun v1.3.6(Linux x64 baseline) error: install script from "tree-sitter-bash" exited with 1 The command /bin/sh -c bun install returned a non-zero code: 1 ### Screenshot and/or share link _No response_ ### Operating System Centos 7 (virtual machine) ### Terminal _No response_
yindo added the bug label 2026-02-16 17:50:42 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#5265