Skip to content

Commit f304585

Browse files
author
Marina Koushnir
committed
feat(ws): Upgrade Go to 1.24 - tensorboard-controller component kubeflow#755
2 parents d26ee6f + ab3a5d0 commit f304585

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

components/tensorboard-controller/Dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@
66
FROM golang:1.24 as builder
77

88
WORKDIR /workspace/tensorboard-controller
9-
# Copy the Go Modules manifests
10-
COPY tensorboard-controller /workspace/tensorboard-controller
119
# cache deps before building and copying source so that we don't need to re-download as much
1210
# and so that source changes don't invalidate our downloaded layer
11+
# Copy only Go module files first for better layer caching
1312
COPY tensorboard-controller/go.mod tensorboard-controller/go.sum ./
13+
# Download dependencies based on mod files
1414
RUN go mod download
15+
# Now copy the full source
16+
COPY tensorboard-controller/ ./
1517

1618
# Build
1719
RUN CGO_ENABLED=0 GOOS=linux go build -a -o /manager main.go
@@ -20,7 +22,7 @@ RUN CGO_ENABLED=0 GOOS=linux go build -a -o /manager main.go
2022
# Refer to https://github.com/GoogleContainerTools/distroless for more details
2123
FROM gcr.io/distroless/static:nonroot
2224
WORKDIR /
23-
USER 65532:65532
2425
COPY --from=builder /manager /manager
26+
USER 65532:65532
2527

2628
ENTRYPOINT ["/manager"]

0 commit comments

Comments
 (0)