Spaces:
Build error
Build error
Upload folder using huggingface_hub
Browse files- Dockerfile +7 -1
Dockerfile
CHANGED
|
@@ -9,12 +9,18 @@ RUN apk add --no-cache git
|
|
| 9 |
# Copy go mod files first for better caching
|
| 10 |
COPY go.mod go.sum .
|
| 11 |
|
| 12 |
-
#
|
|
|
|
|
|
|
|
|
|
| 13 |
RUN go mod download
|
| 14 |
|
| 15 |
# Copy source code
|
| 16 |
COPY . .
|
| 17 |
|
|
|
|
|
|
|
|
|
|
| 18 |
# Build the Go binary
|
| 19 |
RUN CGO_ENABLED=0 GOOS=linux go build -o github-mcp-server ./cmd/github-mcp-server
|
| 20 |
|
|
|
|
| 9 |
# Copy go mod files first for better caching
|
| 10 |
COPY go.mod go.sum .
|
| 11 |
|
| 12 |
+
# Allow Go to regenerate go.sum based on actual imports
|
| 13 |
+
RUN go mod tidy
|
| 14 |
+
|
| 15 |
+
# Download dependencies using the updated go.sum
|
| 16 |
RUN go mod download
|
| 17 |
|
| 18 |
# Copy source code
|
| 19 |
COPY . .
|
| 20 |
|
| 21 |
+
# Optional but recommended
|
| 22 |
+
RUN go mod verify
|
| 23 |
+
|
| 24 |
# Build the Go binary
|
| 25 |
RUN CGO_ENABLED=0 GOOS=linux go build -o github-mcp-server ./cmd/github-mcp-server
|
| 26 |
|