# This Dockerfile is used by CI to publish the installer image.
# It builds an image containing only the openshift-install.

FROM openshift/golang-builder:1.12 AS builder
ENV OS_GIT_MAJOR=4 OS_GIT_MINOR=3 OS_GIT_PATCH=9 OS_GIT_VERSION=4.3.9-202003230345-64fccd9 OS_GIT_TREE_STATE=clean SOURCE_GIT_COMMIT=64fccd954517812eab166d38c7fc5bf71b219b7e SOURCE_GIT_TAG=64fccd95 SOURCE_GIT_URL=https://github.com/openshift/installer SOURCE_DATE_EPOCH=1584741138 OS_GIT_COMMIT=64fccd9 BUILD_VERSION=v4.3.9 BUILD_RELEASE=202003230345
WORKDIR /go/src/github.com/openshift/installer
COPY . .
RUN hack/build.sh


FROM openshift/ose-base:v4.3.9.20200323.034557
ENV OS_GIT_MAJOR=4 OS_GIT_MINOR=3 OS_GIT_PATCH=9 OS_GIT_VERSION=4.3.9-202003230345-64fccd9 OS_GIT_TREE_STATE=clean SOURCE_GIT_COMMIT=64fccd954517812eab166d38c7fc5bf71b219b7e SOURCE_GIT_TAG=64fccd95 SOURCE_GIT_URL=https://github.com/openshift/installer SOURCE_DATE_EPOCH=1584741138 OS_GIT_COMMIT=64fccd9 BUILD_VERSION=v4.3.9 BUILD_RELEASE=202003230345
COPY --from=builder /go/src/github.com/openshift/installer/bin/openshift-install /bin/openshift-install
RUN mkdir /output && chown 1000:1000 /output
USER 1000:1000
ENV PATH /bin
ENV HOME /output
WORKDIR /output
ENTRYPOINT ["/bin/openshift-install"]

LABEL \
        name="openshift/ose-installer" \
        com.redhat.component="ose-installer-container" \
        version="v4.3.9" \
        release="202003230345" \
        io.openshift.build.commit.id="64fccd954517812eab166d38c7fc5bf71b219b7e" \
        io.openshift.build.source-location="https://github.com/openshift/installer" \
        io.openshift.build.commit.url="https://github.com/openshift/installer/commit/64fccd954517812eab166d38c7fc5bf71b219b7e"

