github.com/dean7474/operator-registry@v1.21.1-0.20220418203638-d4717f98c2e5/Dockerfile (about) 1 FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.17-openshift-4.8 AS builder 2 3 ENV GOPATH /go 4 ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH 5 6 WORKDIR /src 7 8 COPY . . 9 RUN make build cross 10 11 # copy and build vendored grpc_health_probe 12 RUN CGO_ENABLED=0 go build -mod=vendor -tags netgo -ldflags "-w" ./vendor/github.com/grpc-ecosystem/grpc-health-probe/... 13 14 FROM registry.ci.openshift.org/ocp/4.8:base 15 16 COPY --from=builder /src/bin/* /bin/registry/ 17 COPY --from=builder /src/grpc-health-probe /bin/grpc_health_probe 18 19 RUN ln -s /bin/registry/* /bin 20 21 RUN mkdir /registry 22 RUN chgrp -R 0 /registry && \ 23 chmod -R g+rwx /registry 24 WORKDIR /registry 25 26 # This image doesn't need to run as root user 27 USER 1001 28 29 EXPOSE 50051 30 31 ENTRYPOINT ["/bin/registry-server"] 32 CMD ["--database", "/bundles.db"] 33 34 LABEL io.k8s.display-name="OpenShift Operator Registry" \ 35 io.k8s.description="This is a component of OpenShift Operator Lifecycle Manager and is the base for operator catalog API containers." \ 36 maintainer="Odin Team <aos-odin@redhat.com>" \ 37 summary="Operator Registry runs in a Kubernetes or OpenShift cluster to provide operator catalog data to Operator Lifecycle Manager."