-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (21 loc) · 971 Bytes
/
Dockerfile
File metadata and controls
30 lines (21 loc) · 971 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
# ── Stage 1: builder ─────────────────────────────────────────────────────────
FROM node:20-alpine AS builder
WORKDIR /app
# Install dependencies (all, including devDependencies needed for tsc)
COPY package*.json ./
RUN npm ci
# Copy source and compile
COPY tsconfig.json ./
COPY src/ ./src/
RUN npm run build
# ── Stage 2: runner ───────────────────────────────────────────────────────────
FROM node:20-alpine AS runner
WORKDIR /app
ENV NODE_ENV=production
# Install production dependencies only
COPY package*.json ./
RUN npm ci --omit=dev
# Copy compiled output from the builder stage
COPY --from=builder /app/dist ./dist
# AgentLoop is an interactive CLI agent; run with `docker run -it`
CMD ["node", "dist/index.js"]