FROM openshift/golang-builder:1.12 AS build
ENV OS_GIT_MAJOR=4 OS_GIT_MINOR=3 OS_GIT_PATCH=13 OS_GIT_VERSION=4.3.13-202004131016-e1bb6a3 OS_GIT_TREE_STATE=clean SOURCE_GIT_COMMIT=e1bb6a3d525867b007e1853b7fc5516230156ccb SOURCE_GIT_TAG=v1.4.1-12-ge1bb6a3 SOURCE_GIT_URL=https://github.com/operator-framework/ghostunnel SOURCE_DATE_EPOCH=1564009631 OS_GIT_COMMIT=e1bb6a3 BUILD_VERSION=v4.3.13 BUILD_RELEASE=202004131016

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.3.13.20200413.101616
ENV OS_GIT_MAJOR=4 OS_GIT_MINOR=3 OS_GIT_PATCH=13 OS_GIT_VERSION=4.3.13-202004131016-e1bb6a3 OS_GIT_TREE_STATE=clean SOURCE_GIT_COMMIT=e1bb6a3d525867b007e1853b7fc5516230156ccb SOURCE_GIT_TAG=v1.4.1-12-ge1bb6a3 SOURCE_GIT_URL=https://github.com/operator-framework/ghostunnel SOURCE_DATE_EPOCH=1564009631 OS_GIT_COMMIT=e1bb6a3 BUILD_VERSION=v4.3.13 BUILD_RELEASE=202004131016

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

ENTRYPOINT ["/usr/bin/ghostunnel"]

LABEL \
        name="openshift/ose-ghostunnel" \
        com.redhat.component="ghostunnel-container" \
        io.openshift.maintainer.product="OpenShift Container Platform" \
        version="v4.3.13" \
        release="202004131016" \
        io.openshift.build.commit.id="e1bb6a3d525867b007e1853b7fc5516230156ccb" \
        io.openshift.build.source-location="https://github.com/operator-framework/ghostunnel" \
        io.openshift.build.commit.url="https://github.com/operator-framework/ghostunnel/commit/e1bb6a3d525867b007e1853b7fc5516230156ccb"

