# This Dockerfile is for the Harper website and web services. # You do not need it to use Harper. ARG NODE_VERSION=24 FROM rust:latest AS wasm-build RUN rustup toolchain install RUN apt-get update -y && apt-get install clang -y RUN mkdir -p /usr/build/ WORKDIR /usr/build/ RUN cargo install wasm-pack COPY . . WORKDIR /usr/build/harper-wasm RUN wasm-pack build --target web RUN cargo clean FROM node:lts-bookworm AS node-build RUN apt-get update && apt-get install git parallel -y RUN corepack enable RUN mkdir -p /usr/build/ WORKDIR /usr/build/ COPY . . COPY --from=wasm-build /usr/build/harper-wasm/pkg /usr/build/harper-wasm/pkg RUN pnpm install --engine-strict=false --shamefully-hoist WORKDIR /usr/build/packages/components RUN pnpm install --engine-strict=false --shamefully-hoist RUN pnpm build WORKDIR /usr/build/packages/harper.js RUN pnpm build && ./docs.sh WORKDIR /usr/build/packages/lint-framework RUN pnpm build WORKDIR /usr/build/packages/web RUN pnpm install --engine-strict=false --shamefully-hoist RUN pnpm build FROM node:lts-bookworm COPY --from=node-build /usr/build/node_modules /usr/build/packages/web/node_modules COPY --from=node-build /usr/build/packages/web/build /usr/build/packages/web/build COPY ./packages/web/drizzle /usr/build/packages/web/build/drizzle COPY --from=node-build /usr/build/packages/web/package.json /usr/build/packages/web/package.json WORKDIR /usr/build/packages/web/build ENV HOST=0.0.0.0 ENV PORT=3000 ENTRYPOINT ["node", "index"]
node_modules target pkg .harper .DS_Store *.log .cache build *.tmp *.tmp *.bak .git .github
Concerns: RUN rustup toolchain install is missing a toolchain spec (needs a specific toolchain like stable) and will likely fail., COPY --from=node-build /usr/build/node_modules /usr/build/packages/web/node_modules copies the wrong path; the node_modules are created under /usr/build/packages/web/node_modules and should be copied from there., Minor improvements: consider EXPOSE 3000 and pin base images (e.g., node:lts-bookworm and rust:...) to specific versions for determinism.
# This Dockerfile is for the Harper website and web services. # You do not need it to use Harper. # Pin a specific Node version to improve determinism # Note: The blueprint mentioned Node 24 features; using a stable LTS base is safer. FROM rust:1.70.0 AS wasm-build # Build the Rust/WASM components RUN apt-get update -y && apt-get install clang -y RUN mkdir -p /usr/build/ WORKDIR /usr/build/ RUN cargo install wasm-pack COPY . . WORKDIR /usr/build/harper-wasm RUN wasm-pack build --target web RUN cargo clean FROM node:lts-bookworm AS node-build RUN apt-get update && apt-get install git parallel -y RUN corepack enable RUN mkdir -p /usr/build/ WORKDIR /usr/build/ COPY . . COPY --from=wasm-build /usr/build/harper-wasm/pkg /usr/build/harper-wasm/pkg RUN pnpm install --engine-strict=false --shamefully-hoist WORKDIR /usr/build/packages/components RUN pnpm install --engine-strict=false --shamefully-hoist RUN pnpm build WORKDIR /usr/build/packages/harper.js RUN pnpm build && ./docs.sh WORKDIR /usr/build/packages/lint-framework RUN pnpm build WORKDIR /usr/build/packages/web RUN pnpm install --engine-strict=false --shamefully-hoist RUN pnpm build FROM node:lts-bookworm # Final runtime stage copies built assets from the node-build stage COPY --from=node-build /usr/build/packages/web/node_modules /usr/build/packages/web/node_modules COPY --from=node-build /usr/build/packages/web/build /usr/build/packages/web/build COPY ./packages/web/drizzle /usr/build/packages/web/build/drizzle COPY --from=node-build /usr/build/packages/web/package.json /usr/build/packages/web/package.json # Expose the web server port EXPOSE 3000 WORKDIR /usr/build/packages/web/build ENV HOST=0.0.0.0 ENV PORT=3000 ENTRYPOINT ["node", "index"]
Error summary - Failing command/step: [wasm-build 5/9] RUN cargo install wasm-pack (Dockerfile:14) - Exit code: 101 Exact error messages (preserved) - error: failed to compile `wasm-pack v0.14.0`, intermediate artifacts can be found at `/tmp/cargo-installxpENqz` - Caused by: - failed to download replaced source registry `crates-io` - Caused by: - failed to parse manifest at `/usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/clap_derive-4.6.0/Cargo.toml` - Caused by: - failed to parse the `edition` key - Caused by: - this version of Cargo is older than the `2024` edition, and only supports `2015`, `2018`, and `2021` editions. Missing packages or files mentioned - None explicitly mentioned as missing. The failure is due to Cargo edition compatibility during wasm-pack installation. Version mismatch / root cause - Root cause: Cargo/Cargo edition compatibility issue with crates that use the 2024 edition. - Context: Base image uses rust:1.70.0, whose Cargo is too old to support the 2024 edition required by clap_derive-4.6.0. - Indicates a need to upgrade the Rust toolchain (or adjust crate/toolchain versions) to support the 2024 edition.
# This Dockerfile is for the Harper website and web services. # You do not need it to use Harper. # Pin a specific Node version to improve determinism # Note: The blueprint mentioned Node 24 features; using a stable LTS base is safer. FROM rust:1.79.0 AS wasm-build # Build the Rust/WASM components RUN apt-get update -y && apt-get install -y clang RUN mkdir -p /usr/build/ WORKDIR /usr/build/ # Install wasm-pack for building Rust/WASM artifacts RUN cargo install wasm-pack COPY . . WORKDIR /usr/build/harper-wasm RUN wasm-pack build --target web RUN cargo clean FROM node:lts-bookworm AS node-build RUN apt-get update && apt-get install git parallel -y RUN corepack enable RUN mkdir -p /usr/build/ WORKDIR /usr/build/ COPY . . COPY --from=wasm-build /usr/build/harper-wasm/pkg /usr/build/harper-wasm/pkg RUN pnpm install --engine-strict=false --shamefully-hoist WORKDIR /usr/build/packages/components RUN pnpm install --engine-strict=false --shamefully-hoist RUN pnpm build WORKDIR /usr/build/packages/harper.js RUN pnpm build && ./docs.sh WORKDIR /usr/build/packages/lint-framework RUN pnpm build WORKDIR /usr/build/packages/web RUN pnpm install --engine-strict=false --shamefully-hoist RUN pnpm build FROM node:lts-bookworm # Final runtime stage copies built assets from the node-build stage COPY --from=node-build /usr/build/packages/web/node_modules /usr/build/packages/web/node_modules COPY --from=node-build /usr/build/packages/web/build /usr/build/packages/web/build COPY ./packages/web/drizzle /usr/build/packages/web/build/drizzle COPY --from=node-build /usr/build/packages/web/package.json /usr/build/packages/web/package.json # Expose the web server port EXPOSE 3000 WORKDIR /usr/build/packages/web/build ENV HOST=0.0.0.0 ENV PORT=3000 ENTRYPOINT ["node", "index"]
- Failing step (command/step): [wasm-build 5/9] RUN cargo install wasm-pack - Exit code: 101 - Exact error messages (preserved): error: failed to compile `wasm-pack v0.14.0`, intermediate artifacts can be found at `/tmp/cargo-install6A0Yvs`. To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path. Caused by: failed to parse manifest at `/usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/time-core-0.1.8/Cargo.toml` Caused by: feature `edition2024` is required The package requires the Cargo feature called `edition2024`, but that feature is not stabilized in this version of Cargo (1.79.0 (ffa9cf99a 2024-06-03)). Consider trying a newer version of Cargo (this may require the nightly release). See https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#edition-2024 for more information about the status of this feature. - Missing packages or files mentioned: None cited as missing; the failure is due to a Cargo edition2024 feature requirement. - Version mismatch info: - Cargo version in use: 1.79.0 (ffa9cf99a 2024-06-03) - The error indicates edition2024 is required but not stabilized in this Cargo version; suggests upgrading Cargo or using nightly.
# This Dockerfile is for the Harper website and web services. # You do not need it to use Harper. # Pin a specific Node version to improve determinism # Note: The blueprint mentioned Node 24 features; using a stable LTS base is safer. FROM rust:nightly AS wasm-build # Build the Rust/WASM components RUN apt-get update -y && apt-get install -y clang RUN mkdir -p /usr/build/ WORKDIR /usr/build/ # Install wasm-pack for building Rust/WASM artifacts RUN cargo install wasm-pack COPY . . WORKDIR /usr/build/harper-wasm RUN wasm-pack build --target web RUN cargo clean FROM node:lts-bookworm AS node-build RUN apt-get update && apt-get install git parallel -y RUN corepack enable RUN mkdir -p /usr/build/ WORKDIR /usr/build/ COPY . . COPY --from=wasm-build /usr/build/harper-wasm/pkg /usr/build/harper-wasm/pkg RUN pnpm install --engine-strict=false --shamefully-hoist WORKDIR /usr/build/packages/components RUN pnpm install --engine-strict=false --shamefully-hoist RUN pnpm build WORKDIR /usr/build/packages/harper.js RUN pnpm build && ./docs.sh WORKDIR /usr/build/packages/lint-framework RUN pnpm build WORKDIR /usr/build/packages/web RUN pnpm install --engine-strict=false --shamefully-hoist RUN pnpm build FROM node:lts-bookworm # Final runtime stage copies built assets from the node-build stage COPY --from=node-build /usr/build/packages/web/node_modules /usr/build/packages/web/node_modules COPY --from=node-build /usr/build/packages/web/build /usr/build/packages/web/build COPY ./packages/web/drizzle /usr/build/packages/web/build/drizzle COPY --from=node-build /usr/build/packages/web/package.json /usr/build/packages/web/package.json # Expose the web server port EXPOSE 3000 WORKDIR /usr/build/packages/web/build ENV HOST=0.0.0.0 ENV PORT=3000 ENTRYPOINT ["node", "index"]
edirom/ess-edition-2019 (0 stars): Edirom Online Edition für ESS Kurs "Workflows und Tools im Kontext digitaler Edi rust (1128 stars): Rust is a systems programming language focused on safety, speed, and concurrency edirom/bargheer-edition (0 stars): Edition der Bargheer Fiedellieder voltactivedata/volt-developer-edition (3 stars): A representative deployment of Volt with a default application. Not for producti rustfs/rustfs (32 stars): High-performance distributed object storage, an alternative to MinIO, Apache 2.0 cimg/rust (9 stars): The CircleCI Rust Docker Convenience Image. syntioinc/dataphos-schema-registry-compatibility (0 stars): Compatibility checker of Syntio Dataphos Schema Registry https://www.syntio.net/ grafana/grafana-image-renderer (32 stars): intel/image-recognition (4 stars): Containers for running image recognition workloads from the Model Zoo for Intel® circleci/rust (6 stars): CircleCI images for Rust
# This Dockerfile is for the Harper website and web services. # You do not need it to use Harper. # Pin a specific Node version to improve determinism # Note: The blueprint mentioned Node 24 features; using a stable LTS base is safer. # Use a stable Rust image that supports edition 2024 or nightly if needed FROM rust:1.80.0 AS wasm-build # Build the Rust/WASM components RUN apt-get update -y && apt-get install -y clang RUN mkdir -p /usr/build/ WORKDIR /usr/build/ # Install wasm-pack for building Rust/WASM artifacts RUN cargo install wasm-pack COPY . . WORKDIR /usr/build/harper-wasm RUN wasm-pack build --target web RUN cargo clean FROM node:lts-bookworm AS node-build RUN apt-get update && apt-get install git parallel -y RUN corepack enable RUN mkdir -p /usr/build/ WORKDIR /usr/build/ COPY . . COPY --from=wasm-build /usr/build/harper-wasm/pkg /usr/build/harper-wasm/pkg RUN pnpm install --engine-strict=false --shamefully-hoist WORKDIR /usr/build/packages/components RUN pnpm install --engine-strict=false --shamefully-hoist RUN pnpm build WORKDIR /usr/build/packages/harper.js RUN pnpm build && ./docs.sh WORKDIR /usr/build/packages/lint-framework RUN pnpm build WORKDIR /usr/build/packages/web RUN pnpm install --engine-strict=false --shamefully-hoist RUN pnpm build FROM node:lts-bookworm # Final runtime stage copies built assets from the node-build stage COPY --from=node-build /usr/build/packages/web/node_modules /usr/build/packages/web/node_modules COPY --from=node-build /usr/build/packages/web/build /usr/build/packages/web/build COPY ./packages/web/drizzle /usr/build/packages/web/build/drizzle COPY --from=node-build /usr/build/packages/web/package.json /usr/build/packages/web/package.json # Expose the web server port EXPOSE 3000 WORKDIR /usr/build/packages/web/build ENV HOST=0.0.0.0 ENV PORT=3000 ENTRYPOINT ["node", "index"]
- Exact error message and exit code
- ERROR: process "/bin/sh -c cargo install wasm-pack" did not complete successfully: exit code: 101
- Caused by:
- failed to parse manifest at `/usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/cargo-platform-0.3.2/Cargo.toml`
- Caused by:
- feature `edition2024` is required
- The package requires the Cargo feature called `edition2024`, but that feature is not stabilized in this version of Cargo (1.80.0 (376290515 2024-07-16)).
- Consider trying a newer version of Cargo (this may require the nightly release).
- See https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#edition-2024 for more information about the status of this feature.
- Failing command/step
- [wasm-build 5/9] RUN cargo install wasm-pack
- Missing packages or files mentioned
- No explicit missing packages/files reported; the issue is a Cargo manifest feature requirement (edition2024) not supported by the installed Cargo.
- Version mismatch information
- Cargo version: 1.80.0
- Required feature: edition2024 (not stabilized in Cargo 1.80.0)
- Suggestion: upgrade Cargo (potentially to nightly) to gain support for edition2024.# This Dockerfile is for the Harper website and web services. # You do not need it to use Harper. # Pin a specific Node version to improve determinism # Note: The blueprint mentioned Node 24 features; using a stable LTS base is safer. FROM rust:1.75.0 AS wasm-build # Build the Rust/WASM components RUN apt-get update -y && apt-get install -y clang RUN mkdir -p /usr/build/ WORKDIR /usr/build/ # Install wasm-pack for building Rust/WASM artifacts RUN cargo install wasm-pack COPY . . WORKDIR /usr/build/harper-wasm RUN wasm-pack build --target web RUN cargo clean FROM node:lts-bookworm AS node-build RUN apt-get update && apt-get install git parallel -y RUN corepack enable RUN mkdir -p /usr/build/ WORKDIR /usr/build/ COPY . . COPY --from=wasm-build /usr/build/harper-wasm/pkg /usr/build/harper-wasm/pkg RUN pnpm install --engine-strict=false --shamefully-hoist WORKDIR /usr/build/packages/components RUN pnpm install --engine-strict=false --shamefully-hoist RUN pnpm build WORKDIR /usr/build/packages/harper.js RUN pnpm build && ./docs.sh WORKDIR /usr/build/packages/lint-framework RUN pnpm build WORKDIR /usr/build/packages/web RUN pnpm install --engine-strict=false --shamefully-hoist RUN pnpm build FROM node:lts-bookworm # Final runtime stage copies built assets from the node-build stage COPY --from=node-build /usr/build/packages/web/node_modules /usr/build/packages/web/node_modules COPY --from=node-build /usr/build/packages/web/build /usr/build/packages/web/build COPY ./packages/web/drizzle /usr/build/packages/web/build/drizzle COPY --from=node-build /usr/build/packages/web/package.json /usr/build/packages/web/package.json # Expose the web server port EXPOSE 3000 WORKDIR /usr/build/packages/web/build ENV HOST=0.0.0.0 ENV PORT=3000 ENTRYPOINT ["node", "index"]
- Build status: build_failed
- Concerns
- Runtime relies on an index file (node index) in /usr/build/packages/web/build; if index.js is absent or located elsewhere, container startup will fail.
- Smoke tests use a non-blocking entrypoint; add a follow-up curl test after the server starts to verify serving content.
- COPY ./packages/web/drizzle into the final image requires the drizzle path to exist in the build context; ensure this path exists to avoid image build failures.
- Build error
- Failing step / command: wasm-build 5/9: RUN cargo install wasm-pack
- Exact error message: failed to compile `wasm-pack v0.14.0`, intermediate artifacts at /tmp/cargo-installgtRTaO
- Causes:
- failed to download replaced source registry crates-io
- failed to parse manifest at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/clap_lex-1.1.0/Cargo.toml
- feature `edition2024` is required
- Additional note: The package requires the Cargo feature called edition2024, but that feature is not stabilized in this version of Cargo (1.75.0 (1d8b05cdd 2023-11-20)).
- Recommendation in error: consider trying a newer version of Cargo (may require nightly); see:
https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#edition-2024
- Exit code
- exit code: 101
- Version mismatch / other notes
- Cargo version in use: 1.75.0 (1d8b05cdd 2023-11-20)
- Edition2024 feature not stabilized in this Cargo version; solution likely to upgrade Cargo (or use nightly).
- Missing packages or files
- No explicit missing packages or files cited; failure attributed to edition2024 feature not supported by current Cargo version.# This Dockerfile is for the Harper website and web services.
# You do not need it to use Harper.
ARG NODE_VERSION=24
FROM rust:1.70.0 AS wasm-build
# Install build dependencies
RUN apt-get update -y && \
apt-get install -y clang pkg-config libssl-dev build-essential && \
rm -rf /var/lib/apt/lists/*
# Build directory
RUN mkdir -p /usr/build/
WORKDIR /usr/build/
# Install wasm-pack
RUN cargo install wasm-pack
COPY . .
WORKDIR /usr/build/harper-wasm
RUN wasm-pack build --target web
RUN cargo clean
FROM node:${NODE_VERSION} AS node-build
RUN apt-get update && apt-get install -y git parallel -y
RUN corepack enable
RUN mkdir -p /usr/build/
WORKDIR /usr/build/
COPY . .
COPY --from=wasm-build /usr/build/harper-wasm/pkg /usr/build/harper-wasm/pkg
RUN pnpm install --engine-strict=false --shamefully-hoist
WORKDIR /usr/build/packages/components
RUN pnpm install --engine-strict=false --shamefully-hoist
RUN pnpm build
WORKDIR /usr/build/packages/harper.js
RUN pnpm build && ./docs.sh
WORKDIR /usr/build/packages/lint-framework
RUN pnpm build
WORKDIR /usr/build/packages/web
RUN pnpm install --engine-strict=false --shamefully-hoist
RUN pnpm build
FROM node:lts-bookworm AS final
COPY --from=node-build /usr/build/node_modules /usr/build/packages/web/node_modules
COPY --from=node-build /usr/build/packages/web/build /usr/build/packages/web/build
COPY ./packages/web/drizzle /usr/build/packages/web/build/drizzle
COPY --from=node-build /usr/build/packages/web/package.json /usr/build/packages/web/package.json
WORKDIR /usr/build/packages/web/build
ENV HOST=0.0.0.0
ENV PORT=3000
ENTRYPOINT ["node", "index"]
# This Dockerfile is for the Harper website and web services.
# You do not need it to use Harper.
# Build-time argument for Node version is avoided to ensure compatibility with official images.
FROM rust:1.70.0 AS wasm-build
# Install build dependencies for compiling wasm-pack
RUN apt-get update -y && \
apt-get install -y clang pkg-config libssl-dev build-essential && \
rm -rf /var/lib/apt/lists/*
RUN mkdir -p /usr/build/
WORKDIR /usr/build/
# Install wasm-pack (needed to build Rust to WASM)
RUN cargo install wasm-pack
COPY . .
WORKDIR /usr/build/harper-wasm
RUN wasm-pack build --target web
RUN cargo clean
FROM node:lts-bookworm AS node-build
RUN apt-get update && apt-get install -y git parallel -y
RUN corepack enable
RUN mkdir -p /usr/build/
WORKDIR /usr/build/
COPY . .
COPY --from=wasm-build /usr/build/harper-wasm/pkg /usr/build/harper-wasm/pkg
RUN pnpm install --engine-strict=false --shamefully-hoist
WORKDIR /usr/build/packages/components
RUN pnpm install --engine-strict=false --shamefully-hoist
RUN pnpm build
WORKDIR /usr/build/packages/harper.js
RUN pnpm build && ./docs.sh
WORKDIR /usr/build/packages/lint-framework
RUN pnpm build
WORKDIR /usr/build/packages/web
RUN pnpm install --engine-strict=false --shamefully-hoist
RUN pnpm build
FROM node:lts-bookworm AS final
COPY --from=node-build /usr/build/node_modules /usr/build/packages/web/node_modules
COPY --from=node-build /usr/build/packages/web/build /usr/build/packages/web/build
COPY ./packages/web/drizzle /usr/build/packages/web/build/drizzle
COPY --from=node-build /usr/build/packages/web/package.json /usr/build/packages/web/package.json
WORKDIR /usr/build/packages/web/build
ENV HOST=0.0.0.0
ENV PORT=3000
ENTRYPOINT ["node", "index"]
node_modules build dist .target Cargo.lock .git .DS_Store .env .env.*
Concerns: The Dockerfile uses 'RUN apt-get update -y' which is invalid usage; update does not take -y. This will cause the build to fail., The line 'RUN apt-get update -y && apt-get install -y clang pkg-config libssl-dev build-essential &&' should be 'RUN apt-get update && apt-get install -y clang pkg-config libssl-dev build-essential' (remove the erroneous -y on update)., There is a redundant '-y' after 'parallel' in 'apt-get install -y git parallel -y'; this treats '-y' as a package name and will error. It should simply be 'apt-get install -y git parallel'.
# This Dockerfile is for the Harper website and web services. # You do not need it to use Harper. # Build-time argument for Node version is avoided to ensure compatibility with official images. FROM rust:1.70.0 AS wasm-build # Install build dependencies for compiling wasm-pack RUN apt-get update && apt-get install -y clang pkg-config libssl-dev build-essential RUN mkdir -p /usr/build/ WORKDIR /usr/build/ # Install wasm-pack (needed to build Rust to WASM) RUN cargo install wasm-pack COPY . . WORKDIR /usr/build/harper-wasm RUN wasm-pack build --target web RUN cargo clean FROM node:lts-bookworm AS node-build RUN apt-get update && apt-get install -y git parallel RUN corepack enable RUN mkdir -p /usr/build/ WORKDIR /usr/build/ COPY . . COPY --from=wasm-build /usr/build/harper-wasm/pkg /usr/build/harper-wasm/pkg RUN pnpm install --engine-strict=false --shamefully-hoist WORKDIR /usr/build/packages/components RUN pnpm install --engine-strict=false --shamefully-hoist RUN pnpm build WORKDIR /usr/build/packages/harper.js RUN pnpm build && ./docs.sh WORKDIR /usr/build/packages/lint-framework RUN pnpm build WORKDIR /usr/build/packages/web RUN pnpm install --engine-strict=false --shamefully-hoist RUN pnpm build FROM node:lts-bookworm AS final COPY --from=node-build /usr/build/node_modules /usr/build/packages/web/node_modules COPY --from=node-build /usr/build/packages/web/build /usr/build/packages/web/build COPY ./packages/web/drizzle /usr/build/packages/web/build/drizzle COPY --from=node-build /usr/build/packages/web/package.json /usr/build/packages/web/package.json WORKDIR /usr/build/packages/web/build ENV HOST=0.0.0.0 ENV PORT=3000 ENTRYPOINT ["node", "index"]
Concerns: COPY ./packages/web/drizzle /usr/build/packages/web/build.drizzle appears to copy to an invalid path (build.drizzle) instead of within the build directory (build/drizzle); this is very likely a typo and will break drizzle assets at runtime., No EXPOSE directive for port 3000; while not fatal, adding EXPOSE 3000 would document the public port., ENTRYPOINT relies on a script named 'index' in the build directory; ensure the file exists (e.g., index.js or an executable named 'index') to prevent startup errors.
# This Dockerfile is for the Harper website and web services. # You do not need it to use Harper. # Build-time argument for Node version is avoided to ensure compatibility with official images. FROM rust:1.70.0 AS wasm-build # Install build dependencies for compiling wasm-pack RUN apt-get update && apt-get install -y clang pkg-config libssl-dev build-essential RUN mkdir -p /usr/build/ WORKDIR /usr/build/ # Install wasm-pack (needed to build Rust to WASM) RUN cargo install wasm-pack COPY . . WORKDIR /usr/build/harper-wasm RUN wasm-pack build --target web RUN cargo clean FROM node:lts-bookworm AS node-build RUN apt-get update && apt-get install -y git parallel RUN corepack enable RUN mkdir -p /usr/build/ WORKDIR /usr/build/ COPY . . COPY --from=wasm-build /usr/build/harper-wasm/pkg /usr/build/harper-wasm/pkg RUN pnpm install --engine-strict=false --shamefully-hoist WORKDIR /usr/build/packages/components RUN pnpm install --engine-strict=false --shamefully-hoist RUN pnpm build WORKDIR /usr/build/packages/harper.js RUN pnpm build && ./docs.sh WORKDIR /usr/build/packages/lint-framework RUN pnpm build WORKDIR /usr/build/packages/web RUN pnpm install --engine-strict=false --shamefully-hoist RUN pnpm build FROM node:lts-bookworm AS final COPY --from=node-build /usr/build/node_modules /usr/build/packages/web/node_modules COPY --from=node-build /usr/build/packages/web/build /usr/build/packages/web/build COPY ./packages/web/drizzle /usr/build/packages/web/build/drizzle COPY --from=node-build /usr/build/packages/web/package.json /usr/build/packages/web/package.json WORKDIR /usr/build/packages/web/build EXPOSE 3000 ENV HOST=0.0.0.0 ENV PORT=3000 ENTRYPOINT ["node", "index"]
Summary (under 1500 chars):
- Exact error message and exit code:
- error: failed to compile `wasm-pack v0.14.0`, intermediate artifacts can be found at `/tmp/cargo-installOWy8px`
- Caused by:
- failed to download replaced source registry `crates-io`
- failed to parse manifest at `/usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/sysinfo-0.37.2/Cargo.toml`
- failed to parse the `edition` key
- this version of Cargo is older than the `2024` edition, and only supports `2015`, `2018`, and `2021` editions.
- ERROR: process "/bin/sh -c cargo install wasm-pack" did not complete successfully: exit code: 101
- Failing command/step:
- wasm-build 5/9: RUN cargo install wasm-pack
- Missing packages or files mentioned:
- Manifest/file causing failure: /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/sysinfo-0.37.2/Cargo.toml
- No explicit missing OS packages cited as the root cause; the failure is due to Cargo manifest edition parsing.
- Version mismatch information:
- The error notes: this version of Cargo is older than the 2024 edition, and only supports 2015, 2018, and 2021 editions.
- Implies the Rust/Cargo in use (from the rust:1.70.0 image) is too old to parse a crate using the 2024 edition (sysinfo-0.37.2). Upgrading the toolchain (or using a newer image) should be considered.# This Dockerfile is for the Harper website and web services. # You do not need it to use Harper. # Build-time argument for Node version is avoided to ensure compatibility with official images. FROM rust:1.80.0 AS wasm-build # Install build dependencies for compiling wasm-pack RUN apt-get update && apt-get install -y clang pkg-config libssl-dev build-essential RUN mkdir -p /usr/build/ WORKDIR /usr/build/ # Install wasm-pack (needed to build Rust to WASM) RUN cargo install wasm-pack COPY . . WORKDIR /usr/build/harper-wasm RUN wasm-pack build --target web RUN cargo clean FROM node:lts-bookworm AS node-build RUN apt-get update && apt-get install -y git parallel RUN corepack enable RUN mkdir -p /usr/build/ WORKDIR /usr/build/ COPY . . COPY --from=wasm-build /usr/build/harper-wasm/pkg /usr/build/harper-wasm/pkg RUN pnpm install --engine-strict=false --shamefully-hoist WORKDIR /usr/build/packages/components RUN pnpm install --engine-strict=false --shamefully-hoist RUN pnpm build WORKDIR /usr/build/packages/harper.js RUN pnpm build && ./docs.sh WORKDIR /usr/build/packages/lint-framework RUN pnpm build WORKDIR /usr/build/packages/web RUN pnpm install --engine-strict=false --shamefully-hoist RUN pnpm build FROM node:lts-bookworm AS final COPY --from=node-build /usr/build/node_modules /usr/build/packages/web/node_modules COPY --from=node-build /usr/build/packages/web/build /usr/build/packages/web/build COPY ./packages/web/drizzle /usr/build/packages/web/build/drizzle COPY --from=node-build /usr/build/packages/web/package.json /usr/build/packages/web/package.json WORKDIR /usr/build/packages/web/build EXPOSE 3000 ENV HOST=0.0.0.0 ENV PORT=3000 ENTRYPOINT ["node", "index"]
Exact error message and exit code - Exit code: 101 - Error excerpt from the failing step: - error: failed to compile `wasm-pack v0.14.0`, intermediate artifacts can be found at `/tmp/cargo-install98T0wR`. - To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path. - Caused by: - failed to parse manifest at `/usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/time-core-0.1.8/Cargo.toml` - Caused by: - feature `edition2024` is required - The package requires the Cargo feature called `edition2024`, but that feature is not stabilized in this version of Cargo (1.80.0 (376290515 2024-07-16)). - Consider trying a newer version of Cargo (this may require the nightly release). - See https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#edition-2024 for more information about the status of this feature. Failing command/step - [wasm-build 5/9] RUN cargo install wasm-pack - Dockerfile: RUN cargo install wasm-pack - Exit during: cargo install wasm-pack (wasm-build step 5/9) Missing packages or files mentioned - No missing OS packages or files cited; issue is a Cargo feature requirement (edition2024) not stabilized in the shipped Cargo. Version mismatch info - Cargo version: 1.80.0 (2024-07-16) - Problem: edition2024 feature is required but not stabilized in Cargo 1.80.0; need a newer Cargo (potentially nightly) to satisfy edition2024.
# This Dockerfile is for the Harper website and web services.
# You do not need it to use Harper.
# Build-time argument for Node version is avoided to ensure compatibility with official images.
FROM rust:1.70.0 AS wasm-build
# Install build dependencies for compiling wasm-pack
RUN apt-get update && apt-get install -y clang pkg-config libssl-dev build-essential curl
# Install a newer Rust toolchain to support newer Cargo features (edition2024)
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly
ENV PATH="/root/.cargo/bin:${PATH}"
RUN mkdir -p /usr/build/
WORKDIR /usr/build/
# Install wasm-pack (needed to build Rust to WASM)
RUN cargo install wasm-pack
COPY . .
WORKDIR /usr/build/harper-wasm
RUN wasm-pack build --target web
RUN cargo clean
FROM node:lts-bookworm AS node-build
RUN apt-get update && apt-get install -y git parallel
RUN corepack enable
RUN mkdir -p /usr/build/
WORKDIR /usr/build/
COPY . .
COPY --from=wasm-build /usr/build/harper-wasm/pkg /usr/build/harper-wasm/pkg
RUN pnpm install --engine-strict=false --shamefully-hoist
WORKDIR /usr/build/packages/components
RUN pnpm install --engine-strict=false --shamefully-hoist
RUN pnpm build
WORKDIR /usr/build/packages/harper.js
RUN pnpm build && ./docs.sh
WORKDIR /usr/build/packages/lint-framework
RUN pnpm build
WORKDIR /usr/build/packages/web
RUN pnpm install --engine-strict=false --shamefully-hoist
RUN pnpm build
FROM node:lts-bookworm AS final
COPY --from=node-build /usr/build/node_modules /usr/build/packages/web/node_modules
COPY --from=node-build /usr/build/packages/web/build /usr/build/packages/web/build
COPY ./packages/web/drizzle /usr/build/packages/web/build/drizzle
COPY --from=node-build /usr/build/packages/web/package.json /usr/build/packages/web/package.json
WORKDIR /usr/build/packages/web/build
EXPOSE 3000
ENV HOST=0.0.0.0
ENV PORT=3000
ENTRYPOINT ["node", "index"]
Build timed out after 600s
Build timed out after 600s
# This Dockerfile is for the Harper website and web services.\n# You do not need it to use Harper.\n\n# Build-time argument for Node version is avoided to ensure compatibility with official images.\n\nFROM rust:1.70.0 AS wasm-build\n# Install build dependencies for compiling wasm-pack (we will use a prebuilt binary to avoid cargo toolchain issues)\nRUN apt-get update && apt-get install -y clang pkg-config libssl-dev build-essential curl ca-certificates\nRUN mkdir -p /usr/build/\nWORKDIR /usr/build/\n\n# Download a prebuilt wasm-pack binary (to avoid cargo-install issues with newer crates)\nRUN curl -L -o /tmp/wasm-pack.tar.gz https://github.com/rustwasm/wasm-pack/releases/download/v0.14.0/wasm-pack-v0.14.0-x86_64-unknown-linux-gnu.tar.gz && \\n tar -xzf /tmp/wasm-pack.tar.gz -C /tmp && \\n mv /tmp/wasm-pack-v0.14.0-x86_64-unknown-linux-gnu/wasm-pack /usr/local/bin/wasm-pack && \\n chmod +x /usr/local/bin/wasm-pack\n\nCOPY . .\n\nWORKDIR /usr/build/harper-wasm\nRUN wasm-pack build --target web\nRUN cargo clean\n\nFROM node:lts-bookworm AS node-build\n\nRUN apt-get update && apt-get install -y git parallel\nRUN corepack enable\n\nRUN mkdir -p /usr/build/\nWORKDIR /usr/build/\n\nCOPY . .\nCOPY --from=wasm-build /usr/build/harper-wasm/pkg /usr/build/harper-wasm/pkg\n\nRUN pnpm install --engine-strict=false --shamefully-hoist\n\nWORKDIR /usr/build/packages/components\nRUN pnpm install --engine-strict=false --shamefully-hoist\nRUN pnpm build\n\nWORKDIR /usr/build/packages/harper.js\nRUN pnpm build && ./docs.sh\n\nWORKDIR /usr/build/packages/lint-framework\nRUN pnpm build\n\nWORKDIR /usr/build/packages/web\nRUN pnpm install --engine-strict=false --shamefully-hoist\nRUN pnpm build\n\nFROM node:lts-bookworm AS final\n\nCOPY --from=node-build /usr/build/node_modules /usr/build/packages/web/node_modules\nCOPY --from=node-build /usr/build/packages/web/build /usr/build/packages/web/build\nCOPY ./packages/web/drizzle /usr/build/packages/web/build/drizzle\nCOPY --from=node-build /usr/build/packages/web/package.json /usr/build/packages/web/package.json\n\nWORKDIR /usr/build/packages/web/build\n\nEXPOSE 3000\nENV HOST=0.0.0.0\nENV PORT=3000\n\nENTRYPOINT ["node", "index"]\n
Concerns: COPY --from=node-build /usr/build/node_modules /usr/build/packages/web/node_modules uses an incorrect source path; the node_modules for the web package are typically at /usr/build/packages/web/node_modules, so this copy likely fails during build., Potential ordering issue: copying the entire /usr/build/packages/web/build from node-build, then attempting to add drizzle under /usr/build/packages/web/build/drizzle afterward may result in drizzle being overwritten or misplaced depending on layer ordering., ENTRYPOINT relies on node index, but the final build directory may not guarantee an index script exists (index.js vs index) and the server startup behavior is not validated by the Dockerfile alone. Consider confirming the actual startup file and/or using a robust CMD/ENTRYPOINT.
# This Dockerfile is for the Harper website and web services.
# You do not need it to use Harper.
# Build-time argument for Node version is avoided to ensure compatibility with official images.
FROM rust:1.70.0 AS wasm-build
# Install build dependencies for compiling wasm-pack (we will use a prebuilt binary to avoid cargo toolchain issues)
RUN apt-get update && apt-get install -y clang pkg-config libssl-dev build-essential curl ca-certificates
RUN mkdir -p /usr/build/
WORKDIR /usr/build/
# Use a prebuilt wasm-pack binary compatible with Node/WebAssembly tooling
RUN curl -L -o /tmp/wasm-pack.tar.gz https://github.com/rustwasm/wasm-pack/releases/download/v0.14.0/wasm-pack-v0.14.0-x86_64-unknown-linux-gnu.tar.gz && \
tar -xzf /tmp/wasm-pack.tar.gz -C /tmp && \
mv /tmp/wasm-pack-v0.14.0-x86_64-unknown-linux-gnu/wasm-pack /usr/local/bin/wasm-pack && \
chmod +x /usr/local/bin/wasm-pack
COPY . .
WORKDIR /usr/build/harper-wasm
RUN wasm-pack build --target web
RUN cargo clean
FROM node:lts-bookworm AS node-build
RUN apt-get update && apt-get install -y git parallel
RUN corepack enable
RUN mkdir -p /usr/build/
WORKDIR /usr/build/
COPY . .
COPY --from=wasm-build /usr/build/harper-wasm/pkg /usr/build/harper-wasm/pkg
RUN pnpm install --engine-strict=false --shamefully-hoist
WORKDIR /usr/build/packages/components
RUN pnpm install --engine-strict=false --shamefully-hoist
RUN pnpm build
WORKDIR /usr/build/packages/harper.js
RUN pnpm build && ./docs.sh
WORKDIR /usr/build/packages/lint-framework
RUN pnpm build
WORKDIR /usr/build/packages/web
RUN pnpm install --engine-strict=false --shamefully-hoist
RUN pnpm build
FROM node:lts-bookworm AS final
COPY --from=node-build /usr/build/packages/web/node_modules /usr/build/packages/web/node_modules
COPY --from=node-build /usr/build/packages/web/build /usr/build/packages/web/build
COPY ./packages/web/drizzle /usr/build/packages/web/build/drizzle
COPY --from=node-build /usr/build/packages/web/package.json /usr/build/packages/web/package.json
WORKDIR /usr/build/packages/web/build
EXPOSE 3000
ENV HOST=0.0.0.0
ENV PORT=3000
CMD ["node"]
- Exact errors and exit code:
- gzip: stdin: not in gzip format
- tar: Child returned status 1
- The RUN command failed with exit code: 2
- Full failure note:
- failed to solve: process "/bin/sh -c curl -L -o /tmp/wasm-pack.tar.gz https://github.com/rustwasm/wasm-pack/releases/download/v0.14.0/wasm-pack-v0.14.0-x86_64-unknown-linux-gnu.tar.gz && tar -xzf /tmp/wasm-pack.tar.gz -C /tmp && mv /tmp/wasm-pack-v0.14.0-x86_64-unknown-linux-gnu/wasm-pack /usr/local/bin/wasm-pack && chmod +x /usr/local/bin/wasm-pack" did not complete successfully: exit code: 2
- Failing command/step:
- [wasm-build 5/9] RUN curl -L -o /tmp/wasm-pack.tar.gz https://github.com/rustwasm/wasm-pack/releases/download/v0.14.0/wasm-pack-v0.14.0-x86_64-unknown-linux-gnu.tar.gz && \
tar -xzf /tmp/wasm-pack.tar.gz -C /tmp && \
mv /tmp/wasm-pack-v0.14.0-x86_64-unknown-linux-gnu/wasm-pack /usr/local/bin/wasm-pack && \
chmod +x /usr/local/bin/wasm-pack
- Missing packages or files:
- No specific OS package missing reported; failure is due to the downloaded wasm-pack tarball not being a gzip tarball. The downloaded file at the URL is not a valid gzip archive, likely returning non-archive content (e.g., 404 HTML).
- Version info:
- wasm-pack version: v0.14.0
- URL: https://github.com/rustwasm/wasm-pack/releases/download/v0.14.0/wasm-pack-v0.14.0-x86_64-unknown-linux-gnu.tar.gz
- Root cause:
- The downloaded file content does not match a gzip tarball; may be a wrong URL or a non-archive response.
- Version mismatch info (note):
- The attempt uses v0.14.0; no explicit mismatch error shown, but the root cause is non-gzip content from the URL.
- Actionable next steps:
- Verify the URL returns a valid gzip tarball (check with curl -I URL, then download and run file /tmp/wasm-pack.tar.gz).
- If 404 or HTML is returned, use a correct/updated asset or a different install method (e.g., cargo install wasm-pack or the official install script).
- Consider updating to a known-good wasm-pack version or using a more reliable installation approach in the Dockerfile.
- Optional: add a HEALTHCHECK and ensure COPY path exists in build context.# This Dockerfile is for the Harper website and web services.
# You do not need it to use Harper.
# Build-time argument for Node version is avoided to ensure compatibility with official images.
FROM rust:1.70.0 AS wasm-build
# Install build dependencies for compiling wasm-pack
RUN apt-get update && apt-get install -y clang pkg-config libssl-dev build-essential curl ca-certificates
# Install rustup and a recent toolchain to enable edition2024 support if needed
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
RUN rustup toolchain install nightly && rustup default nightly
# Create build directory
RUN mkdir -p /usr/build/
WORKDIR /usr/build/
# Install wasm-pack using the nightly toolchain
RUN cargo install wasm-pack
COPY . .
WORKDIR /usr/build/harper-wasm
RUN wasm-pack build --target web
RUN cargo clean
FROM node:lts-bookworm AS node-build
RUN apt-get update && apt-get install -y git parallel
RUN corepack enable
RUN mkdir -p /usr/build/
WORKDIR /usr/build/
COPY . .
COPY --from=wasm-build /usr/build/harper-wasm/pkg /usr/build/harper-wasm/pkg
RUN pnpm install --engine-strict=false --shamefully-hoist
WORKDIR /usr/build/packages/components
RUN pnpm install --engine-strict=false --shamefully-hoist
RUN pnpm build
WORKDIR /usr/build/packages/harper.js
RUN pnpm build && ./docs.sh
WORKDIR /usr/build/packages/lint-framework
RUN pnpm build
WORKDIR /usr/build/packages/web
RUN pnpm install --engine-strict=false --shamefully-hoist
RUN pnpm build
FROM node:lts-bookworm AS final
# Install curl for healthcheck in final image
RUN apt-get update && apt-get install -y curl
COPY --from=node-build /usr/build/packages/web/node_modules /usr/build/packages/web/node_modules
COPY --from=node-build /usr/build/packages/web/build /usr/build/packages/web/build
COPY ./packages/web/drizzle /usr/build/packages/web/build/drizzle
COPY --from=node-build /usr/build/packages/web/package.json /usr/build/packages/web/package.json
WORKDIR /usr/build/packages/web/build
EXPOSE 3000
ENV HOST=0.0.0.0
ENV PORT=3000
HEALTHCHECK --interval=30s --timeout=5s CMD curl -f http://localhost:3000/health || exit 1
CMD ["node", "index.js"]
Build timed out after 600s
Build timed out after 600s
node_modules build .dist target Cargo.lock .git .DS_Store .env .env.*
Build timed out after 600s
# This Dockerfile is for building Harper website and web services. # Multi-stage build: compile Rust wasm, build Node assets, package final runtime image. # 1) Build Rust wasm artifacts FROM rust:latest AS wasm-build RUN apt-get update -y && apt-get install -y clang RUN mkdir -p /usr/build/ WORKDIR /usr/build/ # Install wasm-pack RUN cargo install wasm-pack # Copy source and build wasm artifacts COPY . . WORKDIR /usr/build/harper-wasm RUN wasm-pack build --target web RUN cargo clean # 2) Build Node assets FROM node:lts-bookworm AS node-build RUN apt-get update && apt-get install -y git parallel RUN corepack enable RUN mkdir -p /usr/build/ WORKDIR /usr/build/ COPY . . COPY --from=wasm-build /usr/build/harper-wasm/pkg /usr/build/harper-wasm/pkg # Install root dependencies (pnpm via corepack) RUN pnpm install --engine-strict=false --shamefully-hoist # Build components package WORKDIR /usr/build/packages/components RUN pnpm install --engine-strict=false --shamefully-hoist RUN pnpm build # Build harper.js package and docs WORKDIR /usr/build/packages/harper.js RUN pnpm build && ./docs.sh # Build lint-framework WORKDIR /usr/build/packages/lint-framework RUN pnpm build # Build web package (frontend) WORKDIR /usr/build/packages/web RUN pnpm install --engine-strict=false --shamefully-hoist RUN pnpm build # 3) Final runtime image FROM node:lts-bookworm # Copy built artifacts from the node-build stage COPY --from=node-build /usr/build/node_modules /usr/build/packages/web/node_modules COPY --from=node-build /usr/build/packages/web/build /usr/build/packages/web/build COPY ./packages/web/drizzle /usr/build/packages/web/build/drizzle COPY --from=node-build /usr/build/packages/web/package.json /usr/build/packages/web/package.json WORKDIR /usr/build/packages/web/build ENV HOST=0.0.0.0 ENV PORT=3000 ENTRYPOINT ["node", "index"]
# Ignore common build and IDE files .git node_modules build dist target Cargo.lock .env *.log .DS_Store # Harper repo specifics harper-wasm/pkg harper-wasm/target
Build timed out after 600s
# This Dockerfile is for building Harper website and web services. # Multi-stage build: compile Rust wasm, build Node assets, package final runtime image. # 1) Build Rust wasm artifacts FROM rust:latest AS wasm-build # Pin Rust-related tools and ensure wasm-pack will be on PATH ENV CARGO_HOME=/usr/local/cargo ENV PATH="$CARGO_HOME/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$PATH" RUN rustup toolchain install RUN apt-get update -y && apt-get install -y clang RUN mkdir -p /usr/build/ WORKDIR /usr/build/ # Install wasm-pack (binaries go to $CARGO_HOME/bin) RUN cargo install wasm-pack COPY . . WORKDIR /usr/build/harper-wasm RUN wasm-pack build --target web RUN cargo clean # 2) Build Node assets FROM node:lts-bookworm AS node-build RUN apt-get update && apt-get install -y git parallel RUN corepack enable RUN mkdir -p /usr/build/ WORKDIR /usr/build/ COPY . . COPY --from=wasm-build /usr/build/harper-wasm/pkg /usr/build/harper-wasm/pkg # Install root dependencies (pnpm via corepack) RUN pnpm install --engine-strict=false --shamefully-hoist # Build components package WORKDIR /usr/build/packages/components RUN pnpm install --engine-strict=false --shamefully-hoist RUN pnpm build # Build harper.js package and docs WORKDIR /usr/build/packages/harper.js RUN pnpm build && ./docs.sh # Build lint-framework WORKDIR /usr/build/packages/lint-framework RUN pnpm build # Build web package (frontend) WORKDIR /usr/build/packages/web RUN pnpm install --engine-strict=false --shamefully-hoist RUN pnpm build # 3) Final runtime image FROM node:lts-bookworm # Copy built artifacts from the node-build stage COPY --from=node-build /usr/build/node_modules /usr/build/packages/web/node_modules COPY --from=node-build /usr/build/packages/web/build /usr/build/packages/web/build COPY ./packages/web/drizzle /usr/build/packages/web/build/drizzle COPY --from=node-build /usr/build/packages/web/package.json /usr/build/packages/web/package.json WORKDIR /usr/build/packages/web/build ENV HOST=0.0.0.0 ENV PORT=3000 ENTRYPOINT ["node", "index"]
Build timed out after 600s
# This Dockerfile is for building Harper website and web services.
# Multi-stage build: compile Rust wasm, build Node assets, package final runtime image.
# 1) Build Rust wasm artifacts
FROM rust:latest AS wasm-build
# Pin Rust-related tools and ensure wasm-pack will be on PATH
ENV CARGO_HOME=/usr/local/cargo
ENV PATH="${CARGO_HOME}/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$PATH"
RUN rustup toolchain install
RUN apt-get update -y && apt-get install -y clang
RUN mkdir -p /usr/build/
WORKDIR /usr/build/
# Install wasm-pack (binaries go to $CARGO_HOME/bin)
RUN cargo install wasm-pack
COPY . .
WORKDIR /usr/build/harper-wasm
RUN wasm-pack build --target web
RUN cargo clean
# 2) Build Node assets
FROM node:lts-bookworm AS node-build
RUN apt-get update && apt-get install -y git parallel
RUN corepack enable
RUN mkdir -p /usr/build/
WORKDIR /usr/build/
COPY . .
COPY --from=wasm-build /usr/build/harper-wasm/pkg /usr/build/harper-wasm/pkg
# Install root dependencies (pnpm via corepack)
RUN pnpm install --engine-strict=false --shamefully-hoist
# Build components package
WORKDIR /usr/build/packages/components
RUN pnpm install --engine-strict=false --shamefully-hoist
RUN pnpm build
# Build harper.js package and docs
WORKDIR /usr/build/packages/harper.js
RUN pnpm build && ./docs.sh
# Build lint-framework
WORKDIR /usr/build/packages/lint-framework
RUN pnpm build
# Build web package (frontend)
WORKDIR /usr/build/packages/web
RUN pnpm install --engine-strict=false --shamefully-hoist
RUN pnpm build
# 3) Final runtime image
FROM node:lts-bookworm
# Copy built artifacts from the node-build stage
COPY --from=node-build /usr/build/node_modules /usr/build/packages/web/node_modules
COPY --from=node-build /usr/build/packages/web/build /usr/build/packages/web/build
COPY ./packages/web/drizzle /usr/build/packages/web/build/drizzle
COPY --from=node-build /usr/build/packages/web/package.json /usr/build/packages/web/package.json
WORKDIR /usr/build/packages/web/build
ENV HOST=0.0.0.0
ENV PORT=3000
EXPOSE 3000
ENTRYPOINT ["node", "index"]
Build timed out after 600s