Skip to content

Commit f2038cd

Browse files
Add Dockerfile
1 parent d889c2d commit f2038cd

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

Dockerfile

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
2+
FROM golang:1.24-alpine AS builder
3+
4+
# Install git since it might be needed for go mod
5+
RUN apk add --no-cache git
6+
7+
WORKDIR /app
8+
9+
# Copy go mod and sum files first for caching
10+
COPY go.mod go.sum ./
11+
RUN go mod tidy
12+
13+
# Copy the rest of the application
14+
COPY . .
15+
16+
# Build the application
17+
RUN CGO_ENABLED=0 go build -o mcp-alapi-cn .
18+
19+
# Final stage
20+
FROM alpine:latest
21+
WORKDIR /app
22+
23+
# Copy the built binary from builder
24+
COPY --from=builder /app/mcp-alapi-cn ./
25+
26+
# Run the MCP server
27+
CMD ["./mcp-alapi-cn"]

0 commit comments

Comments
 (0)