-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
43 lines (31 loc) · 1.38 KB
/
Dockerfile
File metadata and controls
43 lines (31 loc) · 1.38 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
# ── Build stage ────────────────────────────────────────────────
FROM python:3.11-slim AS builder
WORKDIR /app
# Install build dependencies
RUN pip install --no-cache-dir build
# Copy project files
COPY pyproject.toml .
COPY src/ src/
# Build wheel
RUN python -m build --wheel --outdir /dist
# ── Runtime stage ────────────────────────────────────────────────
FROM python:3.11-slim
LABEL org.opencontainers.image.title="feishu-miqroera-mcp"
LABEL org.opencontainers.image.description="Feishu MCP Server for AI Agents"
LABEL org.opencontainers.image.licenses="MIT"
WORKDIR /app
# Install runtime dependencies
COPY --from=builder /dist/*.whl /tmp/
RUN pip install --no-cache-dir /tmp/*.whl && rm /tmp/*.whl
# Copy env template
COPY .env.example .env.example
# Run as non-root user
RUN useradd -m -u 1000 appuser && chown -R appuser /app
USER appuser
# Default: start MCP Server (stdio mode)
# To start the long-connection listener instead: docker run ... feishu-mcp listen
ENTRYPOINT ["python", "-m"]
CMD ["feishu_mcp.server"]
# Available commands:
# python -m feishu_mcp.server → MCP Server (stdio)
# python -m feishu_mcp.webhook.longconn → Feishu long-connection event listener