Skip to content

Commit

Permalink
fix: Resolve EC label and image errors
Browse files Browse the repository at this point in the history
Add missing labels which should be present and update images
used in Dockerfile for the integration tests to pass.

Signed-off-by: Homaja Marisetty <hmariset@redhat.com>
  • Loading branch information
hmariset committed Mar 19, 2024
1 parent d32c210 commit 2ce8ea1
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the manager binary
FROM golang:1.21 AS builder
FROM registry.access.redhat.com/ubi9/go-toolset:1.20.10-2 AS builder
ARG TARGETOS
ARG TARGETARCH

Expand All @@ -24,10 +24,17 @@ COPY internal/ internal/
RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -o manager cmd/main.go

# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
FROM gcr.io/distroless/static:nonroot
# Refer to https://catalog.redhat.com/software/containers/ubi9-micro/61832b36dd607bfc82e66399 for more details
FROM registry.access.redhat.com/ubi9-micro@sha256:8e33df2832f039b4b1adc53efd783f9404449994b46ae321ee4a0bf4499d5c42
WORKDIR /
COPY --from=builder /workspace/manager .
USER 65532:65532

# It is mandatory to set these labels
LABEL name="Konflux Project Controller"
LABEL description="Konflux Project Controller"
LABEL com.redhat.component="Konflux Project Controller"
LABEL io.k8s.description="Konflux Project Controller"
LABEL io.k8s.display-name="konflux-project-controller"

ENTRYPOINT ["/manager"]

0 comments on commit 2ce8ea1

Please sign in to comment.