-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
44 lines (32 loc) · 1.18 KB
/
Copy pathDockerfile
File metadata and controls
44 lines (32 loc) · 1.18 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
# Dockerfile for agentweb-mcp
# Used by the Glama (glama.ai) automated build + security checks.
# End users typically install this via `npx -y agentweb-mcp`, but Glama
# requires a Dockerfile in the repo so it can run quality checks against
# a sandboxed build of the MCP server.
# ----- builder ---------------------------------------------------------------
FROM node:20-alpine AS builder
WORKDIR /app
# Install all deps (including dev) for the TypeScript build
COPY package.json package-lock.json* ./
RUN npm install
# Build
COPY tsconfig.json ./
COPY src ./src
RUN npm run build
# ----- runtime ---------------------------------------------------------------
FROM node:20-alpine
WORKDIR /app
# Production deps only
COPY package.json package-lock.json* ./
RUN npm install --omit=dev && npm cache clean --force
# Copy compiled JS from builder
COPY --from=builder /app/dist ./dist
# Documentation / metadata files
COPY README.md LICENSE ./
# AGENTWEB_API_KEY is required at runtime — get a free one at:
# https://agentweb.live/#signup
ENV AGENTWEB_API_KEY=""
# Run as non-root for safety
USER node
# MCP servers communicate over stdio — no port to expose
ENTRYPOINT ["node", "dist/index.js"]