From cbf5c93578ee9b5e02b556043da3ec83168c7288 Mon Sep 17 00:00:00 2001 From: Bowen Wang Date: Mon, 23 Feb 2026 10:37:52 -0800 Subject: [PATCH] fix: copy missing files in Dockerfile to fix build (#322) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: copy missing files in Dockerfile to fix build The Docker build failed because Cargo.toml references files that were not copied into the builder stage: 1. tests/html_to_markdown.rs — declared as [[test]] in Cargo.toml, Cargo validates the path exists even when only building a binary. 2. build.rs — auto-discovered build script that embeds registry manifests at compile time via include_str!(env!("OUT_DIR")). 3. registry/ — contains extension manifests read by build.rs to generate the embedded catalog. Added COPY directives for build.rs, tests/, and registry/. Fixes nearai/ironclaw#320 Co-Authored-By: Claude Opus 4.6 * Address serrrfirat review feedback on WASM channel omission - Add Dockerfile comment documenting that channels-src/ is intentionally omitted since WASM compilation requires wasm32-wasip2 and wasm-tools which are not installed in the builder stage Co-Authored-By: Claude Opus 4.6 * Add WASM channel compilation support to Docker build - Copy channels-src/ into builder stage for Telegram/Slack/Discord/WhatsApp - Install wasm32-wasip2 target and wasm-tools so build.rs can compile WASM channel components instead of silently skipping them Co-Authored-By: Claude Opus 4.6 --------- Co-authored-by: Claude Opus 4.6 --- Dockerfile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 34d4d484..e0040c48 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,16 +11,22 @@ FROM rust:1.92-slim-bookworm AS builder RUN apt-get update && apt-get install -y --no-install-recommends \ pkg-config libssl-dev cmake gcc g++ \ - && rm -rf /var/lib/apt/lists/* + && rm -rf /var/lib/apt/lists/* \ + && rustup target add wasm32-wasip2 \ + && cargo install wasm-tools WORKDIR /app # Copy manifests first for layer caching COPY Cargo.toml Cargo.lock ./ -# Copy source and build artifacts +# Copy source, build script, tests, and supporting directories +COPY build.rs build.rs COPY src/ src/ +COPY tests/ tests/ COPY migrations/ migrations/ +COPY registry/ registry/ +COPY channels-src/ channels-src/ COPY wit/ wit/ RUN cargo build --release --bin ironclaw