@@ -12,44 +12,18 @@ WORKDIR /src
12
12
COPY . .
13
13
RUN make build/registry cross
14
14
15
- # copy and build vendored grpc_health_probe
16
- RUN CGO_ENABLED=0 go build -mod=vendor -tags netgo -ldflags "-w" ./vendor/github.com/grpc-ecosystem/grpc-health-probe/...
15
+ FROM scratch
17
16
18
- FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.21-openshift-4.16 AS staticbuilder
19
- # Permit opm binary to be compiled statically. The Red Hat compiler
20
- # provided by ART will otherwise force FIPS compliant dynamic compilation.
21
- ENV GO_COMPLIANCE_EXCLUDE="build.*operator-registry/cmd/opm"
22
- ENV GOPATH /go
23
- ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
24
- WORKDIR /src
25
- COPY . .
26
- RUN CGO_ENABLED=0 make build/registry
27
- FROM registry.ci.openshift.org/ocp/4.16:base-rhel9
17
+ COPY --from=builder /src/bin/opm /clis/opm-rhel9
18
+ COPY --from=builder /src/bin/darwin-amd64-opm /clis/darwin-amd64-opm
19
+ COPY --from=builder /src/bin/windows-amd64-opm /clis/windows-amd64-opm
28
20
29
- COPY --from=builder /src/bin/* /bin/registry/
30
- COPY --from=builder /src/grpc-health-probe /bin/grpc_health_probe
31
- # copy the dynamically-linked versions to /bin/registry with a -rhel8 suffix
32
- COPY --from=builder-rhel8 /src/bin/opm /bin/registry/opm-rhel8
33
- COPY --from=builder-rhel8 /src/bin/registry-server /bin/registry/registry-server-rhel8
34
- COPY --from=builder-rhel8 /src/bin/initializer /bin/registry/initializer-rhel8
35
- COPY --from=builder-rhel8 /src/bin/configmap-server /bin/registry/configmap-server-rhel8
36
-
37
- COPY --from=staticbuilder /src/bin/opm /bin/registry/opm-static
38
-
39
- RUN ln -s /bin/registry/* /bin
40
-
41
- RUN mkdir /registry
42
- RUN chgrp -R 0 /registry && \
43
- chmod -R g+rwx /registry
44
- WORKDIR /registry
21
+ # copy the dynamically-linked versions to /clis with a -rhel8 suffix
22
+ COPY --from=builder-rhel8 /src/bin/opm /clis/opm-rhel8
45
23
46
24
USER 1001
47
- EXPOSE 50051
48
-
49
- ENTRYPOINT ["/bin/registry-server"]
50
- CMD ["--database", "/bundles.db"]
51
25
52
- LABEL io.k8s.display-name="OpenShift Operator Registry " \
53
- io.k8s.description="This is a component of OpenShift Operator Lifecycle Manager and is the base for operator catalog API containers ." \
26
+ LABEL io.k8s.display-name="OpenShift Operator Lifecycle Manager CLIs " \
27
+ io.k8s.description="This is a component of OpenShift Operator Lifecycle Manager and is used to manipulate related artifacts, including catalogs of operators ." \
54
28
maintainer="Odin Team <
[email protected] >" \
55
- summary="Operator Registry runs in a Kubernetes or OpenShift cluster to provide operator catalog data to Operator Lifecycle Manager ."
29
+ summary="Operator Lifecycle Manager CLIS are used to manipulate OLM infrastructure, including catalogs of operators ."
0 commit comments