-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.mcp
More file actions
40 lines (29 loc) · 994 Bytes
/
Dockerfile.mcp
File metadata and controls
40 lines (29 loc) · 994 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
38
39
40
# Dockerfile.mcp — builds the LightCMS MCP server binary only.
# The MCP server connects to a running LightCMS instance via HTTP.
#
# Required environment variables at runtime:
# LIGHTCMS_URL - Base URL of the LightCMS instance (e.g. https://example.com)
# LIGHTCMS_API_KEY - API key created in the LightCMS admin panel (/cm/api-keys)
#
# Usage (stdio transport):
# docker run -i \
# -e LIGHTCMS_URL=https://example.com \
# -e LIGHTCMS_API_KEY=lc_xxxx \
# ghcr.io/jonradoff/lightcms-mcp
# Build stage
FROM golang:1.25-bookworm AS builder
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -o lightcms-mcp ./cmd/mcp
# Runtime stage
FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY --from=builder /app/lightcms-mcp .
ENV LIGHTCMS_URL=""
ENV LIGHTCMS_API_KEY=""
ENTRYPOINT ["./lightcms-mcp"]