# 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=10 OS_GIT_VERSION=4.3.10-202003311428-0a7f198 OS_GIT_TREE_STATE=clean SOURCE_GIT_COMMIT=0a7f198c1d5667152ef5982fd2fc0c22abc4336f SOURCE_GIT_TAG=0a7f198c SOURCE_GIT_URL=https://github.com/openshift/installer SOURCE_DATE_EPOCH=1585344560 OS_GIT_COMMIT=0a7f198 BUILD_VERSION=v4.3.10 BUILD_RELEASE=202003311428
WORKDIR /go/src/github.com/openshift/installer
COPY . .
RUN hack/build.sh


FROM openshift/ose-base:v4.3.10.20200331.142813
ENV OS_GIT_MAJOR=4 OS_GIT_MINOR=3 OS_GIT_PATCH=10 OS_GIT_VERSION=4.3.10-202003311428-0a7f198 OS_GIT_TREE_STATE=clean SOURCE_GIT_COMMIT=0a7f198c1d5667152ef5982fd2fc0c22abc4336f SOURCE_GIT_TAG=0a7f198c SOURCE_GIT_URL=https://github.com/openshift/installer SOURCE_DATE_EPOCH=1585344560 OS_GIT_COMMIT=0a7f198 BUILD_VERSION=v4.3.10 BUILD_RELEASE=202003311428
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.10" \
        release="202003311428" \
        io.openshift.build.commit.id="0a7f198c1d5667152ef5982fd2fc0c22abc4336f" \
        io.openshift.build.source-location="https://github.com/openshift/installer" \
        io.openshift.build.commit.url="https://github.com/openshift/installer/commit/0a7f198c1d5667152ef5982fd2fc0c22abc4336f"

