# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
FROM golang:1.24-alpine AS builder
# Install git since it might be needed for go mod
RUN apk add --no-cache git
WORKDIR /app
# Copy go mod and sum files first for caching
COPY go.mod go.sum ./
RUN go mod tidy
# Copy the rest of the application
COPY . .
# Build the application
RUN CGO_ENABLED=0 go build -o mcp-alapi-cn .
# Final stage
FROM alpine:latest
WORKDIR /app
# Copy the built binary from builder
COPY --from=builder /app/mcp-alapi-cn ./
# Run the MCP server
CMD ["./mcp-alapi-cn"]