forked from opendatahub-io/codeflare-operator
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile.konflux
44 lines (33 loc) · 1.51 KB
/
Dockerfile.konflux
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
39
40
41
42
43
44
# Build arguments
ARG SOURCE_CODE=.
FROM registry.access.redhat.com/ubi8/go-toolset:1.22@sha256:e66779cc9bef4b5d3361134fda8f054314eef5dc6b356086bae59e65805a57ad AS builder
WORKDIR /workspace
# Copy the Go Modules manifests
COPY go.mod go.mod
COPY go.sum go.sum
# cache deps before building and copying source so that we don't need to re-download as much
# and so that source changes don't invalidate our downloaded layer
RUN go mod download
# Copy the go source
COPY . .
# Copy the Go sources
COPY main.go main.go
COPY pkg/ pkg/
RUN git config --global --add safe.directory /workspace
# Build
USER root
RUN CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -tags strictfipsruntime -a -o manager main.go
FROM registry.access.redhat.com/ubi8/ubi-minimal@sha256:c12e67af6a7e15113d76bc72f10bef2045c026c71ec8b7124c8a075458188a83
WORKDIR /
COPY --from=builder /workspace/manager .
USER 65532:65532
ENTRYPOINT ["/manager"]
LABEL com.redhat.component="odh-codeflare-operator-container" \
description="Manages lifecycle of MCAD and InstaScale custom resources and associated Kubernetes resources" \
name="managed-open-data-hub/odh-codeflare-operator-container-rhel8" \
summary="odh-codeflare-operator-container" \
maintainer="['[email protected]']" \
io.openshift.expose-services="" \
io.k8s.display-name="odh-codeflare-operator-container" \
io.k8s.description="odh-codeflare-operator" \
com.redhat.license_terms="https://www.redhat.com/licenses/Red_Hat_Standard_EULA_20191108.pdf"