-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathDockerfile
More file actions
26 lines (19 loc) · 767 Bytes
/
Dockerfile
File metadata and controls
26 lines (19 loc) · 767 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
# SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Gardener contributors
#
# SPDX-License-Identifier: Apache-2.0
############# builder
FROM golang:1.26.1 AS builder
ARG TARGETARCH
WORKDIR /go/src/github.com/gardener/gardener-discovery-server
# Copy go mod and sum files
COPY go.mod go.sum ./
# Download all dependencies. Dependencies will be cached if the go.mod and go.sum files are not changed
RUN go mod download
COPY . .
ARG EFFECTIVE_VERSION
RUN make install EFFECTIVE_VERSION=$EFFECTIVE_VERSION
############# gardener-discovery-server
FROM gcr.io/distroless/static-debian13:nonroot AS gardener-discovery-server
WORKDIR /
COPY --from=builder /go/bin/discovery-server /gardener-discovery-server
ENTRYPOINT ["/gardener-discovery-server"]