forked from opendatahub-io/opendatahub-operator
-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathDockerfile.konflux
More file actions
55 lines (48 loc) · 1.95 KB
/
Dockerfile.konflux
File metadata and controls
55 lines (48 loc) · 1.95 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
50
51
52
53
54
55
# Build the manager binary
################################################################################
FROM registry.redhat.io/ubi8/go-toolset:1.25@sha256:351110e9d9c4ecba77d7bd69aa3b7106cfecda4f3848ec8e1e74dd460404df5d as builder
USER root
WORKDIR /opt
# copy local manifests to build
COPY opt/manifests/ /opt/manifests/
COPY prefetched-manifests/ /opt/manifests/
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 apis/ apis/
COPY components/ components/
COPY controllers/ controllers/
COPY main.go main.go
COPY pkg/ pkg/
# Copy monitoring config
COPY config/monitoring/ /opt/manifests/monitoring/
# Copy partners config
COPY config/partners/ /opt/manifests/partners/
# Copy ods-configs
COPY config/osd-configs/ /opt/manifests/osd-configs/
# Build
RUN CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -a -o manager main.go
################################################################################
FROM registry.access.redhat.com/ubi8/ubi-minimal@sha256:308d6f6b433dfb38b5df78e23a66d42decfa997e556b92d38733df710ec38634
WORKDIR /
COPY --from=builder /workspace/manager .
COPY --chown=1001:0 --from=builder /opt/manifests /opt/manifests
# Recursive change all files
RUN chown -R 1001:0 /opt/manifests &&\
chmod -R g=u /opt/manifests
USER 1001
ENTRYPOINT ["/manager"]
LABEL com.redhat.component="odh-operator-container" \
description="rhoai-operator" \
name="managed-open-data-hub/odh-rhel8-operator" \
summary="odh-operator" \
maintainer="['managed-open-data-hub@redhat.com']" \
io.openshift.expose-services="" \
io.k8s.display-name="odh-operator" \
io.k8s.description="odh-operator" \
com.redhat.license_terms="https://www.redhat.com/licenses/Red_Hat_Standard_EULA_20191108.pdf"