Skip to content

Commit 419bfd0

Browse files
committed
fix: Build binary with cleanup-cache TFO-MCP
1 parent 2a0a1e6 commit 419bfd0

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

Dockerfile

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,14 @@ WORKDIR /build
1515
# Set GOPRIVATE to bypass checksum database for telemetryflow SDK
1616
ENV GOPRIVATE=github.com/telemetryflow/*
1717

18-
# Copy source code
19-
COPY . .
18+
# Copy go module files first for better caching
19+
COPY go.mod go.sum ./
2020

21-
# Cleanup Cache
22-
RUN go clean -modcache -cache
23-
RUN rm -f go.sum
21+
# Download dependencies (leverages Docker layer caching)
22+
RUN go mod download && go mod verify
2423

25-
# Download dependencies
26-
RUN go mod download
24+
# Copy source code
25+
COPY . .
2726

2827
# Build arguments
2928
ARG VERSION=1.1.2

0 commit comments

Comments
 (0)