-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (24 loc) · 900 Bytes
/
Dockerfile
File metadata and controls
33 lines (24 loc) · 900 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
32
33
# SPDX-FileCopyrightText: 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/diki-operator
# 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
############# diki-operator
FROM gcr.io/distroless/static-debian13:nonroot AS diki-operator
WORKDIR /
COPY --from=builder /go/bin/diki-operator /diki-operator
ENTRYPOINT ["/diki-operator"]
############# report-exporter
FROM gcr.io/distroless/static-debian13:nonroot AS report-exporter
WORKDIR /
COPY --from=builder /go/bin/report-exporter /report-exporter
ENTRYPOINT ["/report-exporter"]