-
Notifications
You must be signed in to change notification settings - Fork 66
/
Dockerfile
32 lines (21 loc) · 755 Bytes
/
Dockerfile
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
32
# SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Gardener contributors
#
# SPDX-License-Identifier: Apache-2.0
############# builder #############
FROM golang:1.23.2 AS builder
WORKDIR /build
# 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 . .
RUN make release
############# base
FROM gcr.io/distroless/static-debian11:nonroot AS base
############# dns-controller-manager #############
FROM base AS dns-controller-manager
WORKDIR /
COPY --from=builder /build/dns-controller-manager /dns-controller-manager
WORKDIR /
USER 65534:65534
ENTRYPOINT ["/dns-controller-manager"]