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/ping-source ./cmd/ping

FROM ubi8:8-released
COPY --from=builder /tmp/ping-source /usr/bin/ping-source

LABEL \
      com.redhat.component="openshift-serverless-1-tech-preview-eventing-ping-source-rhel8-container" \
      name="openshift-serverless-1-tech-preview/eventing-ping-source-rhel8" \
      version="0.13.3" \
      summary="Red Hat OpenShift Serverless 1 Eventing Ping Source" \
      maintainer="mwessend@redhat.com" \
      description="Red Hat OpenShift Serverless 1 Eventing Ping Source" \
      io.k8s.display-name="Red Hat OpenShift Serverless 1 Eventing Ping Source"

ENTRYPOINT ["/usr/bin/ping-source"]
