Files
openworker/harness/examples/quickstart/Dockerfile
T
Rohit PrasadandDevika Verma d53e058eda Introduce OpenWorker Harness SDK (in beta), agent service cluster and relevant developer documentation (#844)
Allow developers to easily build AI apps without worrying about the harness part.
Bundles the Rust agent runtime as a SDK (Rust and TypeScript) for building desktop and web applications. Applications can manage a local harness or connect to an authenticated harness service on k8s with separately scaled workers and sandbox execution.

The implementation is primarily contained in harness/, with deployment tooling in deploy/, Markdown guides in docs/harness/guides/, and the static documentation site in docs-site/. It does not replace the existing Python harness or migrate OpenWorker Desktop.

Co-authored-by: Devika Verma <devikaverma11@gmail.com>
2026-11-06 09:45:20 -08:00

24 lines
1.1 KiB
Docker

# Build from the repository root, with a native Linux helper matching TARGETARCH.
FROM node:24-bookworm-slim AS build
WORKDIR /src
COPY harness/typescript-sdk/package*.json harness/typescript-sdk/
RUN npm --prefix harness/typescript-sdk ci
COPY harness/typescript-sdk/ harness/typescript-sdk/
RUN npm --prefix harness/typescript-sdk run build
COPY harness/examples/quickstart/ harness/examples/quickstart/
WORKDIR /src/harness/examples/quickstart
ENV ELECTRON_SKIP_BINARY_DOWNLOAD=1
RUN npm ci --ignore-scripts && npm run build && npm prune --omit=dev && npm --prefix ../../typescript-sdk prune --omit=dev
FROM node:24-bookworm-slim
WORKDIR /app
COPY --from=build /src/harness /harness
# Supply this file from a matching OpenWorker Linux release/build before docker build.
COPY harness/examples/quickstart/bin/openworker-harness /usr/local/bin/openworker-harness
RUN chmod 755 /usr/local/bin/openworker-harness && mkdir /state && chown node:node /state
USER node
ENV HOST=0.0.0.0 PORT=8080 OPENWORKER_STATE_DIR=/state OPENWORKER_EXECUTABLE=/usr/local/bin/openworker-harness
WORKDIR /harness/examples/quickstart
EXPOSE 8080
CMD ["node","web/server.mjs"]