-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.demo
More file actions
69 lines (53 loc) · 2.1 KB
/
Dockerfile.demo
File metadata and controls
69 lines (53 loc) · 2.1 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# Specific Chronos container image for demo purpose.
#
# Extends the Dockerfile.local with `uv` / `uvx` python package manager
# to get local fetch MCP preset (which spawns `uvx mcp-server-fetch`) working
# out of the box when registered via the demo seeder.
#
# Build:
# docker build -f Dockerfile.demo -t chronos:demo ..
FROM node:24-alpine AS builder
RUN apk add --no-cache \
libc6-compat \
python3 \
make \
g++ \
build-base \
cairo-dev \
pango-dev \
curl && \
npm install -g pnpm@10.33.4
ENV NODE_OPTIONS=--max-old-space-size=8192
WORKDIR /app
COPY . .
RUN pnpm install --frozen-lockfile && pnpm build && CI=true pnpm prune --prod
FROM node:24-alpine AS production
# Runtime baseline matches Dockerfile.local (libc6-compat + curl + pnpm)
# plus python3 + uv. uv binaries are copied from the official astral-sh/uv
# image — avoids running the install script on Alpine where BusyBox
# `realpath` lacks GNU's `--` end-of-options separator that uv's internal
# path resolution depends on.
RUN apk add --no-cache \
libc6-compat \
curl \
python3 \
py3-pip && \
npm install -g pnpm@10.33.4
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /usr/local/bin/
ENV NODE_ENV=production
WORKDIR /app
COPY --from=builder /app/package.json ./
COPY --from=builder /app/pnpm-lock.yaml ./
COPY --from=builder /app/pnpm-workspace.yaml ./
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/packages/server/dist ./packages/server/dist
COPY --from=builder /app/packages/server/package.json ./packages/server/
COPY --from=builder /app/packages/server/templates ./packages/server/templates
COPY --from=builder /app/packages/server/providers.config.json ./packages/server/
COPY --from=builder /app/packages/ui/build ./packages/ui/build
COPY --from=builder /app/packages/ui/package.json ./packages/ui/
COPY --from=builder /app/packages/components/dist ./packages/components/dist
COPY --from=builder /app/packages/components/package.json ./packages/components/
COPY --from=builder /app/packages/components/models.json ./packages/components/
EXPOSE 3000
CMD ["pnpm", "start"]