Repository navigation
Expand file tree
/
Copy pathDockerfile
More file actions
44 lines (37 loc) · 1.65 KB
/
Copy pathDockerfile
File metadata and controls
44 lines (37 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
FROM node:22-bookworm-slim AS build
WORKDIR /app
RUN corepack enable
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
COPY apps/desktop/package.json ./apps/desktop/package.json
RUN pnpm install --frozen-lockfile
COPY . .
RUN pnpm run build
RUN pnpm prune --prod --no-optional
FROM node:22-bookworm-slim AS runtime
WORKDIR /app
ENV NODE_ENV=production
ENV PORT=3040
ENV DATA_DIR=/data
# ripgrep/fd back the agent's `grep` and `find` tools. Installed here so pi
# resolves them from PATH (it accepts Debian's `fdfind` name) rather than
# downloading binaries at runtime, which PI_OFFLINE forbids.
RUN apt-get update \
&& apt-get install -y --no-install-recommends ripgrep fd-find \
&& rm -rf /var/lib/apt/lists/*
COPY --from=build /app/build ./build
COPY --from=build /app/node_modules ./node_modules
COPY --from=build /app/package.json ./package.json
COPY --from=build /app/pnpm-lock.yaml ./pnpm-lock.yaml
COPY --from=build /app/pnpm-workspace.yaml ./pnpm-workspace.yaml
COPY --from=build /app/.env.example ./.env.example
COPY --from=build /app/bin ./bin
COPY --from=build /app/scripts/runtime ./scripts/runtime
COPY --from=build /app/assets/test-images ./assets/test-images
COPY --from=build /app/src/lib/server/agent/prompts ./src/lib/server/agent/prompts
# Built-in plugin packages staged at boot by builtinBootstrap.ts — keep in sync
# with BUILTIN_PACKAGES (guarded by scripts/runtime/release-bundle.test.mjs).
COPY --from=build /app/package/external-subagent ./package/external-subagent
COPY --from=build /app/package/trace-viewer ./package/trace-viewer
COPY --from=build /app/package/cloudflare-html ./package/cloudflare-html
EXPOSE 3040
CMD ["node", "build"]