We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2a0a1e6 commit 419bfd0Copy full SHA for 419bfd0
1 file changed
Dockerfile
@@ -15,15 +15,14 @@ WORKDIR /build
15
# Set GOPRIVATE to bypass checksum database for telemetryflow SDK
16
ENV GOPRIVATE=github.com/telemetryflow/*
17
18
-# Copy source code
19
-COPY . .
+# Copy go module files first for better caching
+COPY go.mod go.sum ./
20
21
-# Cleanup Cache
22
-RUN go clean -modcache -cache
23
-RUN rm -f go.sum
+# Download dependencies (leverages Docker layer caching)
+RUN go mod download && go mod verify
24
25
-# Download dependencies
26
-RUN go mod download
+# Copy source code
+COPY . .
27
28
# Build arguments
29
ARG VERSION=1.1.2
0 commit comments