-
Notifications
You must be signed in to change notification settings - Fork 82
Expand file tree
/
Copy pathoperator-lifecycle-manager.Dockerfile
More file actions
63 lines (52 loc) · 2.54 KB
/
operator-lifecycle-manager.Dockerfile
File metadata and controls
63 lines (52 loc) · 2.54 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
56
57
58
59
60
61
62
63
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.25-openshift-4.22 AS builder
ENV GO111MODULE auto
ENV GOPATH /go
ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
# Permit the cpb and copy-content binaries to be compiled statically. The Red Hat compiler
# provided by ART will otherwise force FIPS compliant dynamic compilation.
ENV GO_COMPLIANCE_EXCLUDE="build.*operator-lifecycle-manager/(util/cpb|cmd/copy-content)"
WORKDIR /build
# copy just enough of the git repo to parse HEAD, used to record version in OLM binaries
COPY .git/HEAD .git/HEAD
COPY .git/refs/heads/. .git/refs/heads
RUN mkdir -p .git/objects
COPY . .
RUN make build/olm bin/cpb && \
# Build the OLMv0 Test Extension binary.
# This is used by openshift/origin to allow us to register the OLMv0 test extension
# The binary needs to be added in the component image and OCP image
cd tests-extension && \
make build && \
mkdir -p /tmp/build && \
cp ./bin/olmv0-tests-ext /tmp/build/olmv0-tests-ext && \
gzip -f /tmp/build/olmv0-tests-ext
FROM registry.ci.openshift.org/ocp/4.22:base-rhel9
ADD manifests/ /manifests
LABEL io.openshift.release.operator=true
# Copy the binary to a standard location where it will run.
COPY --from=builder /build/bin/olm /bin/olm
COPY --from=builder /build/bin/catalog /bin/catalog
COPY --from=builder /build/bin/collect-profiles /bin/collect-profiles
COPY --from=builder /build/bin/package-server /bin/package-server
COPY --from=builder /build/bin/cpb /bin/cpb
COPY --from=builder /build/bin/psm /bin/psm
COPY --from=builder /build/bin/copy-content /bin/copy-content
COPY --from=builder /tmp/build/olmv0-tests-ext.gz /usr/bin/olmv0-tests-ext.gz
# This image doesn't need to run as root user.
USER 1001
EXPOSE 8080
EXPOSE 5443
# Apply labels as needed. ART build automation fills in others required for
# shipping, including component NVR (name-version-release) and image name. OSBS
# applies others at build time. So most required labels need not be in the source.
#
# io.k8s.display-name is required and is displayed in certain places in the
# console (someone correct this if that's no longer the case)
#
# io.k8s.description is equivalent to "description" and should be defined per
# image; otherwise the parent image's description is inherited which is
# confusing at best when examining images.
#
LABEL io.k8s.display-name="OpenShift Operator Lifecycle Manager" \
io.k8s.description="This is a component of OpenShift Container Platform and manages the lifecycle of operators." \
maintainer="Odin Team <aos-odin@redhat.com>"