Skip to content

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

@inv1s10n

Description

@inv1s10n

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions