FROM rhel8/go-toolset:1.13.4 AS builder
WORKDIR /opt/app-root/src/go/src/knative.dev/eventing
COPY . .
RUN go build -o /tmp/channel-broker ./cmd/channel_broker

FROM ubi8:8-released
COPY --from=builder /tmp/channel-broker /usr/bin/channel-broker

LABEL \
      com.redhat.component="openshift-serverless-1-tech-preview-eventing-channel-broker-rhel8-container" \
      name="openshift-serverless-1-tech-preview/eventing-channel-broker-rhel8" \
      version="0.14.2" \
      summary="Red Hat OpenShift Serverless 1 Eventing Channel Broker" \
      maintainer="serverless-support@redhat.com" \
      description="Red Hat OpenShift Serverless 1 Eventing Channel Broker" \
      io.k8s.display-name="Red Hat OpenShift Serverless 1 Eventing Channel Broker"

ENTRYPOINT ["/usr/bin/channel-broker"]
