From 5aa278f7eeb283aaee0673110d37d347b064fe70 Mon Sep 17 00:00:00 2001 From: southseact-3d Date: Mon, 16 Feb 2026 16:57:42 +0000 Subject: [PATCH] Fix Dockerfile: Run build from correct directory with better error handling --- Dockerfile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 052182a..b4b96fa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,6 +19,7 @@ RUN apt-get update \ unzip \ build-essential \ python3 \ + cmake \ && rm -rf /var/lib/apt/lists/* # Install Node.js (required for some dependencies) @@ -40,10 +41,11 @@ RUN git config --global url."https://github.com/".insteadOf "ssh://git@github.co # Install dependencies at root level first (for workspaces) ENV HUSKY=0 -RUN bun install 2>&1 || (echo "Retrying bun install..." && bun install --force 2>&1) +RUN bun install 2>&1 -# Build OpenCode CLI -RUN cd packages/opencode && bun run ./script/build.ts --single 2>&1 +# Build OpenCode CLI - run from root directory where package.json is +WORKDIR /opt/opencode-src +RUN cd packages/opencode && bun run script/build.ts --single 2>&1 || (echo "Build failed, checking logs..." && cat /tmp/build.log 2>/dev/null || echo "No log file" && exit 1) # Final stage FROM ubuntu:24.04