FROM openshift/golang-builder:rhel_8_golang_1.15 AS build
ENV __doozer=update BUILD_RELEASE=202101300140.p0 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-202101300140.p0 SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=2795644 OS_GIT_VERSION=4.6.0-202101300140.p0-2795644 SOURCE_DATE_EPOCH=1600380514 SOURCE_GIT_COMMIT=27956445ce4b77b2bf89740c85d91072bf11f3d4 SOURCE_GIT_TAG=v1.4.1-25-g2795644 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.20210130.021535
ENV __doozer=update BUILD_RELEASE=202101300140.p0 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-202101300140.p0 SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=2795644 OS_GIT_VERSION=4.6.0-202101300140.p0-2795644 SOURCE_DATE_EPOCH=1600380514 SOURCE_GIT_COMMIT=27956445ce4b77b2bf89740c85d91072bf11f3d4 SOURCE_GIT_TAG=v1.4.1-25-g2795644 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="202101300140.p0" \
        io.openshift.build.commit.id="27956445ce4b77b2bf89740c85d91072bf11f3d4" \
        io.openshift.build.source-location="https://github.com/kube-reporting/ghostunnel" \
        io.openshift.build.commit.url="https://github.com/kube-reporting/ghostunnel/commit/27956445ce4b77b2bf89740c85d91072bf11f3d4" \
        version="v4.6.0"

