#@follow_tag(openshift-golang-builder:1.13)
FROM openshift-golang-builder:v1.13.4-2 AS builder

ENV GOPATH=/go

ARG upstream_version=7d4b382
ARG upstream_commit=7d4b382a51a18d4a8987fb5be5a65778628c2caa
ARG archive=performance-addon-operators-7d4b382a51a18d4a8987fb5be5a65778628c2caa.tar.gz
ARG project_dir=${GOPATH}/src/github.com/openshift-kni/performance-addon-operators

COPY ${archive} /

RUN mkdir -p ${project_dir} && tar -xzf /${archive} --strip-components 1 -C ${project_dir}
WORKDIR ${project_dir}

RUN make dist

#@follow_tag(ubi8-minimal:8-released)
FROM ubi8-minimal:8.1-407

COPY --from=builder ${project_dir}/build/assets /assets
COPY --from=builder ${project_dir}/build/_output/bin/performance-addon-operators /bin/performance-operator

ENTRYPOINT ["/bin/performance-operator"]

LABEL com.redhat.component="performance-addon-operator-container" \
      name="openshift4/performance-addon-rhel8-operator" \
      version="v4.4.0" \
      release="48" \
      upstream-version="7d4b382" \
      upstream-vcs-ref="7d4b382a51a18d4a8987fb5be5a65778628c2caa" \
      upstream-vcs-type="git" \
      summary="performance-addon-operator" \
      io.openshift.expose-services="" \
      io.openshift.tags="operator" \
      io.k8s.display-name="performance-addon-operator" \
      maintainer="openshift-operators@redhat.com" \
      description="performance-addon-operator"
