FROM openshift/golang-builder@sha256:2c34135dc4d4a35fa19775e4e559e2e6f2e476a0ccdc993360e3663729904035
ENV __doozer=update BUILD_RELEASE=202202152218.p0.gf6ffb0d.assembly.stream BUILD_VERSION=v4.8.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=8 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.8.0-202202152218.p0.gf6ffb0d.assembly.stream SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=f6ffb0d OS_GIT_VERSION=4.8.0-202202152218.p0.gf6ffb0d.assembly.stream-f6ffb0d SOURCE_DATE_EPOCH=1631716592 SOURCE_GIT_COMMIT=f6ffb0d7c2935db9d349f8dc1c51d9ea1b0df5ce SOURCE_GIT_TAG=f6ffb0d7 SOURCE_GIT_URL=https://github.com/openshift/csi-driver-manila-operator 
COPY . /go/src/github.com/openshift/csi-driver-manila-operator
RUN cd /go/src/github.com/openshift/csi-driver-manila-operator && \
    go build -mod vendor -o csi-driver-manila-operator cmd/csi-driver-manila-operator/main.go

FROM openshift/ose-base:v4.8.0.20220215.234309
ENV __doozer=update BUILD_RELEASE=202202152218.p0.gf6ffb0d.assembly.stream BUILD_VERSION=v4.8.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=8 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.8.0-202202152218.p0.gf6ffb0d.assembly.stream SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=f6ffb0d OS_GIT_VERSION=4.8.0-202202152218.p0.gf6ffb0d.assembly.stream-f6ffb0d SOURCE_DATE_EPOCH=1631716592 SOURCE_GIT_COMMIT=f6ffb0d7c2935db9d349f8dc1c51d9ea1b0df5ce SOURCE_GIT_TAG=f6ffb0d7 SOURCE_GIT_URL=https://github.com/openshift/csi-driver-manila-operator 

ENV OPERATOR=/usr/local/bin/csi-driver-manila-operator \
    USER_UID=1001 \
    USER_NAME=csi-driver-manila-operator

COPY --from=0 /go/src/github.com/openshift/csi-driver-manila-operator/csi-driver-manila-operator ${OPERATOR}

COPY build/bin /usr/local/bin
RUN  /usr/local/bin/user_setup

ENTRYPOINT ["/usr/local/bin/entrypoint"]

USER ${USER_UID}

LABEL \
        name="openshift/ose-csi-driver-manila-operator" \
        com.redhat.component="csi-driver-manila-operator-container" \
        io.openshift.maintainer.product="OpenShift Container Platform" \
        io.openshift.maintainer.component="Installer" \
        io.openshift.maintainer.subcomponent="OpenShift on OpenStack" \
        release="202202152218.p0.gf6ffb0d.assembly.stream" \
        io.openshift.build.commit.id="f6ffb0d7c2935db9d349f8dc1c51d9ea1b0df5ce" \
        io.openshift.build.source-location="https://github.com/openshift/csi-driver-manila-operator" \
        io.openshift.build.commit.url="https://github.com/openshift/csi-driver-manila-operator/commit/f6ffb0d7c2935db9d349f8dc1c51d9ea1b0df5ce" \
        version="v4.8.0"

