Files
can1357 ad318c7572 build: configured docker build pipelines for cargo native addons
- Switched Docker images to build native addons via cargo/napi-rs (`OMP_NATIVE_BUILD_BACKEND=cargo`) instead of Bazel.
- Updated Cargo.toml workspace members explicitly to prevent loading errors from stale directories under crates/.
- Added depth-agnostic patterns to .dockerignore files to exclude nested build outputs from Docker build contexts.
- Added OMP_NATIVE_CARGO_PROFILE environment variable to support configuring cargo profiles for addon builds.
2026-08-14 07:09:48 +02:00

32 lines
1017 B
Docker

# Test binary build from local source
FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y curl ca-certificates unzip build-essential && rm -rf /var/lib/apt/lists/*
# Install bun
RUN curl -fsSL https://bun.sh/install | bash
ENV PATH="/root/.bun/bin:$PATH"
# Install Rust. The natives build defaults to Bazel; this image has no
# bazelisk and needs only the host addon, so route it through cargo/napi-rs.
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly
ENV PATH="/root/.cargo/bin:$PATH" \
OMP_NATIVE_BUILD_BACKEND=cargo
# Copy local repo
WORKDIR /repo
COPY . .
# Build native addon and binary
RUN bun install --frozen-lockfile
RUN bun --cwd=packages/natives run build
RUN cd packages/coding-agent && bun run build
# Install binary to PATH
RUN mkdir -p /root/.local/bin && \
cp packages/coding-agent/dist/omp /root/.local/bin/
ENV PATH="/root/.local/bin:$PATH"
# Verify
RUN HOME=/tmp/omp-home XDG_DATA_HOME=/tmp/omp-xdg omp --version