FROM openshift/golang-builder:rhel_8_golang_1.15 AS build
ENV __doozer=update BUILD_RELEASE=202201111633.p0.gd5ea7b7.assembly.stream BUILD_VERSION=v4.6.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=6 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.6.0-202201111633.p0.gd5ea7b7.assembly.stream SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=d5ea7b7 OS_GIT_VERSION=4.6.0-202201111633.p0.gd5ea7b7.assembly.stream-d5ea7b7 SOURCE_DATE_EPOCH=1613065602 SOURCE_GIT_COMMIT=d5ea7b772b19c50a55483958cd71678e171c0d8e SOURCE_GIT_TAG=v1.4.1-27-gd5ea7b7 SOURCE_GIT_URL=https://github.com/kube-reporting/ghostunnel 

COPY . /go/src/github.com/square/ghostunnel

RUN CGO_ENABLED=0 go build -tags nopkcs11 -o /usr/bin/ghostunnel github.com/square/ghostunnel

FROM openshift/ose-base:v4.6.0.20220111.164849
ENV __doozer=update BUILD_RELEASE=202201111633.p0.gd5ea7b7.assembly.stream BUILD_VERSION=v4.6.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=6 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.6.0-202201111633.p0.gd5ea7b7.assembly.stream SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=d5ea7b7 OS_GIT_VERSION=4.6.0-202201111633.p0.gd5ea7b7.assembly.stream-d5ea7b7 SOURCE_DATE_EPOCH=1613065602 SOURCE_GIT_COMMIT=d5ea7b772b19c50a55483958cd71678e171c0d8e SOURCE_GIT_TAG=v1.4.1-27-gd5ea7b7 SOURCE_GIT_URL=https://github.com/kube-reporting/ghostunnel 

COPY --from=build /usr/bin/ghostunnel /usr/bin/ghostunnel

ENTRYPOINT ["/usr/bin/ghostunnel"]

LABEL \
        io.k8s.display-name="OpenShift Ghostunnel" \
        io.k8s.description="This is an image used by the Metering Operator to install and run Ghostunnel." \
        summary="This is an image used by the Metering Operator to install and run Ghostunnel." \
        io.openshift.tags="openshift" \
        maintainer="<metering-team@redhat.com>" \
        name="openshift/ose-ghostunnel" \
        com.redhat.component="ghostunnel-container" \
        io.openshift.maintainer.product="OpenShift Container Platform" \
        io.openshift.maintainer.component="Metering Operator" \
        release="202201111633.p0.gd5ea7b7.assembly.stream" \
        io.openshift.build.commit.id="d5ea7b772b19c50a55483958cd71678e171c0d8e" \
        io.openshift.build.source-location="https://github.com/kube-reporting/ghostunnel" \
        io.openshift.build.commit.url="https://github.com/kube-reporting/ghostunnel/commit/d5ea7b772b19c50a55483958cd71678e171c0d8e" \
        version="v4.6.0"

