FROM registry-proxy.engineering.redhat.com/rh-osbs/rhel8-go-toolset:1.15.13-4 AS builder
WORKDIR /opt/app-root/src/go/src/knative.dev/eventing
COPY . .
ENV GOFLAGS="-mod=vendor"
RUN go build -o /tmp/mtbroker-ingress ./cmd/broker/ingress

FROM registry-proxy.engineering.redhat.com/rh-osbs/ubi8-minimal:8.4-200.1622548483
COPY --from=builder /tmp/mtbroker-ingress /usr/bin/mtbroker-ingress

LABEL \
      com.redhat.component="openshift-serverless-1-eventing-mtbroker-ingress-rhel8-container" \
      name="openshift-serverless-1/eventing-mtbroker-ingress-rhel8" \
      version="0.22.0" \
      summary="Red Hat OpenShift Serverless 1 Eventing Multi-Tenant Broker Ingress" \
      maintainer="serverless-support@redhat.com" \
      description="Red Hat OpenShift Serverless 1 Eventing Multi-Tenant Broker Ingress" \
      io.k8s.display-name="Red Hat OpenShift Serverless 1 Eventing Multi-Tenant Broker Ingress"

ENTRYPOINT ["/usr/bin/mtbroker-ingress"]
