forked from openshift/special-resource-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
48 lines (34 loc) · 1.21 KB
/
Dockerfile
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
# Build the manager binary
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.17-openshift-4.10 as builder
WORKDIR /workspace
# Copy the Go Modules manifests
COPY go.mod go.mod
COPY go.sum go.sum
COPY hack/ hack/
COPY helm-plugins/ helm-plugins/
COPY Makefile.specialresource.mk Makefile.specialresource.mk
COPY Makefile.helm.mk Makefile.helm.mk
COPY Makefile.helper.mk Makefile.helper.mk
COPY Makefile Makefile
COPY scripts/ scripts/
# Copy the go source
COPY vendor/ vendor/
COPY .patches/ .patches/
COPY main.go main.go
COPY api/ api/
COPY cmd/ cmd/
COPY controllers/ controllers/
COPY pkg/ pkg/
RUN ["make", "manager", "helm-plugins/cm-getter/cm-getter"]
FROM registry.ci.openshift.org/ocp/4.10:base
COPY helm-plugins/ helm-plugins/
WORKDIR /
ENV HELM_PLUGINS /opt/helm-plugins
COPY --from=builder /workspace/manager .
COPY --from=builder /workspace/helm-plugins ${HELM_PLUGINS}
COPY charts/ /charts/
RUN useradd -r -u 499 nonroot
RUN getent group nonroot || groupadd -o -g 499 nonroot
ENTRYPOINT ["/manager"]
LABEL io.k8s.display-name="OpenShift Special Resource Operator" \
io.k8s.description="This is a component of OpenShift and manages the lifecycle of out-of-tree drivers with enablement stack."