-
Notifications
You must be signed in to change notification settings - Fork 41
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (24 loc) · 914 Bytes
/
Dockerfile
File metadata and controls
37 lines (24 loc) · 914 Bytes
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
# syntax=docker/dockerfile:1
# --- Build stage ---
FROM node:22-alpine AS build
RUN corepack enable && corepack prepare pnpm@10.28.2 --activate
WORKDIR /app
COPY package.json pnpm-lock.yaml ./
RUN --mount=type=cache,id=pnpm,target=/root/.local/share/pnpm/store \
pnpm install --frozen-lockfile
COPY tsconfig.json tsdown.config.ts ./
COPY src/ src/
RUN pnpm run build
# --- Production stage ---
FROM node:22-alpine
LABEL org.opencontainers.image.title="aimock"
LABEL org.opencontainers.image.description="Mock infrastructure for AI application testing"
LABEL org.opencontainers.image.source="https://github.com/CopilotKit/llmock"
WORKDIR /app
# git is needed for sparse-checkout fixture fetching in production
RUN apk add --no-cache git
COPY --from=build /app/dist/ dist/
COPY fixtures/ fixtures/
EXPOSE 4010
ENTRYPOINT ["node", "dist/cli.js"]
CMD ["--fixtures", "./fixtures", "--host", "0.0.0.0"]