forked from kserve/kserve
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathllmisvc-controller.Dockerfile
More file actions
31 lines (24 loc) · 991 Bytes
/
llmisvc-controller.Dockerfile
File metadata and controls
31 lines (24 loc) · 991 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
# Build the manager binary
FROM golang:1.25 AS builder
# Copy in the go src
WORKDIR /go/src/github.com/kserve/kserve
COPY go.mod go.mod
COPY go.sum go.sum
RUN go mod download
# Install license tool (cached independently of source changes)
RUN go install github.com/google/go-licenses@v1.6.0
COPY LICENSE LICENSE
ARG CMD=llmisvc
COPY cmd/${CMD}/ cmd/${CMD}/
COPY pkg/ pkg/
# Check and generate third-party licenses (fast, fail-fast on violations)
RUN go-licenses check ./cmd/${CMD} ./pkg/... --disallowed_types="forbidden,unknown" && \
go-licenses save --save_path third_party/library ./cmd/${CMD}
# Build
ARG GOTAGS=""
RUN CGO_ENABLED=0 GOOS=linux GOFLAGS=-mod=readonly go build -tags "${GOTAGS}" -a -o manager ./cmd/${CMD}
# Copy the controller-manager into a thin image
FROM gcr.io/distroless/static:nonroot
COPY --from=builder /go/src/github.com/kserve/kserve/third_party /third_party
COPY --from=builder /go/src/github.com/kserve/kserve/manager /
ENTRYPOINT ["/manager"]