Skip to content

Commit 1e9893d

Browse files
Add Dockerfile.konflux for 2.8
1 parent 57e1c4e commit 1e9893d

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

Dockerfile.konflux

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Build arguments
2+
ARG SOURCE_CODE=.
3+
4+
FROM registry.access.redhat.com/ubi8/go-toolset:1.21@sha256:742ae6ec1aef3e7faae488c47695fb64964d342aefecf52d23bd9d5e6731d0b6 AS builder
5+
6+
WORKDIR /workspace
7+
8+
# Copy the Go Modules manifests
9+
COPY go.mod go.mod
10+
COPY go.sum go.sum
11+
# cache deps before building and copying source so that we don't need to re-download as much
12+
# and so that source changes don't invalidate our downloaded layer
13+
RUN go mod download
14+
15+
# Copy the go source
16+
COPY . .
17+
18+
# Copy the Go sources
19+
COPY main.go main.go
20+
COPY pkg/ pkg/
21+
22+
RUN git config --global --add safe.directory /workspace
23+
24+
# Build
25+
USER root
26+
27+
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -tags strictfipsruntime -a -o manager main.go
28+
29+
FROM registry.access.redhat.com/ubi8/ubi-minimal@sha256:cf095e5668919ba1b4ace3888107684ad9d587b1830d3eb56973e6a54f456e67
30+
WORKDIR /
31+
COPY --from=builder /workspace/manager .
32+
33+
USER 65532:65532
34+
ENTRYPOINT ["/manager"]
35+
36+
LABEL com.redhat.component="odh-codeflare-operator-container" \
37+
description="Manages lifecycle of MCAD and InstaScale custom resources and associated Kubernetes resources" \
38+
name="managed-open-data-hub/odh-codeflare-operator-container-rhel8" \
39+
summary="odh-codeflare-operator-container" \
40+
maintainer="['[email protected]']" \
41+
io.openshift.expose-services="" \
42+
io.k8s.display-name="odh-codeflare-operator-container" \
43+
io.k8s.description="odh-codeflare-operator" \
44+
com.redhat.license_terms="https://www.redhat.com/licenses/Red_Hat_Standard_EULA_20191108.pdf"

0 commit comments

Comments
 (0)