forked from opendatahub-io/data-science-pipelines-operator
-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathDockerfile.konflux
More file actions
49 lines (37 loc) · 1.82 KB
/
Copy pathDockerfile.konflux
File metadata and controls
49 lines (37 loc) · 1.82 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
39
40
41
42
43
44
45
46
47
48
49
# Build arguments
ARG SOURCE_CODE=.
FROM registry.access.redhat.com/ubi9/go-toolset:1.24@sha256:6234f572204d672a0ee0686d748fbb9b7b05679368bf0d7a4446e13970e58060 as builder
ARG SOURCE_CODE
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 main.go main.go
COPY api/ api/
COPY controllers/ controllers/
COPY config/internal config/internal
USER root
# Build
RUN CGO_ENABLED=1 GOOS=linux GOARCH=amd64 GO111MODULE=on GOEXPERIMENT=strictfipsruntime go build -tags strictfipsruntime -a -o manager main.go
FROM registry.access.redhat.com/ubi9/ubi-minimal@sha256:759f5f42d9d6ce2a705e290b7fc549e2d2cd39312c4fa345f93c02e4abb8da95 AS runtime
## Build args to be used at this step
ARG USER=65532
LABEL com.redhat.component="odh-data-science-pipelines-operator-controller-container" \
name="managed-open-data-hub/odh-data-science-pipelines-operator-controller-rhel8" \
description="Manages lifecycle of Data Science Pipelines Custom Resources and associated Kubernetes resources" \
summary="odh-data-science-pipelines-operator-controller" \
maintainer="['managed-open-data-hub@redhat.com']" \
io.openshift.expose-services="" \
io.k8s.display-name="data-science-pipelines-operator-controller" \
io.k8s.description="data-science-pipelines-operator-controller" \
com.redhat.license_terms="https://www.redhat.com/licenses/Red_Hat_Standard_EULA_20191108.pdf"
WORKDIR /
COPY --from=builder /workspace/manager .
COPY --from=builder /workspace/config/internal ./config/internal
## Create a non-root user with UID 65532 and switch to it
USER ${USER}:${USER}
ENTRYPOINT ["/manager"]