Skip to content

Add local Dockerfile for environment setup and runtime validation - #269

Open
tomadowley wants to merge 1 commit into
masterfrom
cosine/generate-default-environment-1
Open

Add local Dockerfile for environment setup and runtime validation#269
tomadowley wants to merge 1 commit into
masterfrom
cosine/generate-default-environment-1

Conversation

@tomadowley

Copy link
Copy Markdown
Owner

Adds a reproducible local environment for the repository by introducing .cosine/Dockerfile. The image is based on Ubuntu and installs essential build tools, Python, and curl/npm. It downloads and installs Node.js v16.20.2 for the host architecture (amd64/arm64) and verifies the runtime by printing node and npm versions during the build. The image sets a working directory at /workspace for convenient development and testing.

How this solves the issue:

  • Provides a consistent, reproducible environment to validate the runtime locally.
  • Ensures correct Node.js version is installed across architectures.
  • Simple workflow to build and run a container that mirrors CI/runtime expectations.

Usage:

  • Build: docker build -t cosine-env -f .cosine/Dockerfile .
  • Run: docker run --rm -it -v "$PWD":/workspace cosine-env
  • Inside container, run node -v and npm -v to verify versions are correct.

The `npm ci`, `npm test`, and `npm run build` commands were run locally. Tests passed with 3 suites and 7 tests. The build also compiled successfully. However, the CX image build failed due to a project resolution error (`multiple projects detected: sorbox, sorbox`), preventing runtime validation. Added `.cosine/Dockerfile` to define the local build environment.

Co-Authored-By: Cosine CLI (gpt-5.4) <agent@cosine.sh>
@vercel

vercel Bot commented Apr 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sorbox Ready Ready Preview, Comment Apr 26, 2026 11:34am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant