-
Notifications
You must be signed in to change notification settings - Fork 45
Expand file tree
/
Copy pathContainerfile.external-dns-operator
More file actions
38 lines (35 loc) · 1.59 KB
/
Containerfile.external-dns-operator
File metadata and controls
38 lines (35 loc) · 1.59 KB
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
34
35
36
37
38
# Detect the drift from Dockerfile.
FROM registry.access.redhat.com/ubi9/ubi-minimal:latest AS drift
WORKDIR /app
COPY drift-cache/Dockerfile Dockerfile.cached
COPY Dockerfile .
# If the command below fails it means that the Dockerfile from this repository changed.
# You have to update the Konflux Containerfile accordingly.
# drift-cache/Dockerfile can be updated with latest contents once the Konflux version is aligned.
RUN test "$(sha1sum Dockerfile.cached | cut -d' ' -f1)" = "$(sha1sum Dockerfile | cut -d' ' -f1)"
FROM registry.access.redhat.com/ubi9/go-toolset:1.24.6-1763548439 as builder
# dummy copy to trigger the drift detection
COPY --from=drift /app/Dockerfile.cached .
WORKDIR /workspace
# Dummy RUN to create /workspace directory.
# WORKDIR doesn't create the directory (at least for Podman).
# Without this step, the following COPY may create /workspace
# as root-owned (instead of go-toolset's default 1001)
# leading to "Permission denied" errors during "make build-operator"
# when trying to write output.
RUN ls .
COPY . /workspace
RUN git config --global --add safe.directory /workspace
# Build
RUN make build-operator
FROM registry.access.redhat.com/ubi9/ubi-minimal:latest@sha256:fe688da81a696387ca53a4c19231e99289591f990c904ef913c51b6e87d4e4df
LABEL maintainer="Red Hat, Inc."
LABEL com.redhat.component="external-dns-operator-container"
LABEL name="external-dns-operator"
LABEL version="1.3.3"
WORKDIR /
COPY --from=builder /workspace/bin/external-dns-operator /
# Red Hat certified container images have licenses.
COPY LICENSE /licenses/
USER 65532:65532
ENTRYPOINT ["/external-dns-operator"]