FROM registry.redhat.io/ubi8/go-toolset:1.14.12 AS builder
WORKDIR /opt/app-root/src/go/src/knative.dev/serving
COPY . .
ENV GOFLAGS="-mod=vendor -tags=disable_gcp,disable_aws,disable_azure"
RUN go build -o /tmp/queue ./cmd/queue

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

LABEL \
      com.redhat.component="openshift-serverless-1-serving-queue-rhel8-container" \
      name="openshift-serverless-1/serving-queue-rhel8" \
      version="0.16.0" \
      summary="Red Hat OpenShift Serverless 1 Serving Queue" \
      maintainer="serverless-support@redhat.com" \
      description="Red Hat OpenShift Serverless 1 Serving Queue" \
      io.k8s.display-name="Red Hat OpenShift Serverless 1 Serving Queue"

ENTRYPOINT ["/ko-app/queue"]
