-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (24 loc) · 721 Bytes
/
Copy pathDockerfile
File metadata and controls
36 lines (24 loc) · 721 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
# Build stage
FROM golang:1.22-alpine AS builder
WORKDIR /app
# Set GOPROXY for better download speed in China
# ENV GOPROXY=https://goproxy.cn,direct
# Install build dependencies
RUN apk add --no-cache git
# Copy go mod files
COPY go.mod go.sum ./
# Download dependencies
RUN go mod download
# Copy source code
COPY . .
# Build the binary
RUN CGO_ENABLED=0 GOOS=linux go build -o FastDomainCheck-MCP-Server
# Final stage
FROM alpine:latest
WORKDIR /app
# Install runtime dependencies
RUN apk add --no-cache ca-certificates whois bind-tools
# Copy binary from builder
COPY --from=builder /app/FastDomainCheck-MCP-Server .
# Run the server (skip health check in container)
CMD ["./FastDomainCheck-MCP-Server"]