FROM registry.redhat.io/ubi8/go-toolset:1.14.12 AS builder
WORKDIR /app/
COPY . .
ENV GOFLAGS="-mod=vendor"
RUN go build -o /tmp/kourier ./cmd/kourier

FROM registry.redhat.io/ubi8/ubi-minimal
COPY --from=builder /tmp/kourier /ko-app/kourier

LABEL \
      com.redhat.component="openshift-serverless-1-kourier-control-rhel8-container" \
      name="openshift-serverless-1/kourier-control-rhel8" \
      version="0.16.0" \
      summary="Red Hat OpenShift Serverless 1 Kourier Control Plane" \
      maintainer="serverless-support@redhat.com" \
      description="Red Hat OpenShift Serverless 1 Kourier Control Plane" \
      io.k8s.display-name="Red Hat OpenShift Serverless 1 Kourier Control Plane"

ENTRYPOINT ["/ko-app/kourier"]
