Skip to content

Commit 0b255bf

Browse files
committed
image just as a cli source for mirror publishing
Signed-off-by: Jordan <[email protected]>
1 parent c84b6ad commit 0b255bf

File tree

1 file changed

+9
-35
lines changed

1 file changed

+9
-35
lines changed

operator-framework-cli.Dockerfile

Lines changed: 9 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -12,44 +12,18 @@ WORKDIR /src
1212
COPY . .
1313
RUN make build/registry cross
1414

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
1716

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
2820

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
4523

4624
USER 1001
47-
EXPOSE 50051
48-
49-
ENTRYPOINT ["/bin/registry-server"]
50-
CMD ["--database", "/bundles.db"]
5125

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." \
5428
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

Comments
 (0)