github.com/openshift/installer@v1.4.17/images/baremetal/Dockerfile.ci (about)

     1  # This Dockerfile is a used by CI to publish an installer image
     2  # It builds an image containing openshift-install.
     3  
     4  # The binaries in these images are dynamically linked
     5  FROM registry.ci.openshift.org/ocp/4.17:etcd AS etcd
     6  FROM registry.ci.openshift.org/ocp/4.17:hyperkube AS kas
     7  
     8  FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.22-openshift-4.17 AS builder
     9  ARG TAGS="baremetal fipscapable"
    10  ARG SKIP_ENVTEST="y"
    11  WORKDIR /go/src/github.com/openshift/installer
    12  COPY . .
    13  COPY --from=etcd /usr/bin/etcd /usr/bin/etcd
    14  COPY --from=kas /usr/bin/kube-apiserver /usr/bin/kube-apiserver
    15  RUN mkdir -p cluster-api/bin/$(go env GOOS)_$(go env GOHOSTARCH) && \
    16  	mv /usr/bin/etcd /usr/bin/kube-apiserver -t cluster-api/bin/$(go env GOOS)_$(go env GOHOSTARCH)/
    17  RUN DEFAULT_ARCH="$(go env GOHOSTARCH)" hack/build.sh
    18  RUN DEFAULT_ARCH="$(go env GOHOSTARCH)" hack/build-node-joiner.sh
    19  
    20  FROM registry.ci.openshift.org/ocp/4.17:base-rhel9
    21  
    22  COPY --from=builder /go/src/github.com/openshift/installer/bin/openshift-install /bin/openshift-install
    23  
    24  RUN dnf upgrade -y && \
    25      dnf install --setopt=tsflags=nodocs -y \
    26      openssl unzip jq openssh-clients && \
    27      dnf clean all && rm -rf /var/cache/yum/*
    28  
    29  # node-joiner requirements
    30  COPY --from=builder /go/src/github.com/openshift/installer/bin/node-joiner /bin/node-joiner
    31  RUN dnf install -y nmstate openshift-clients && \
    32      dnf clean all && rm -rf /var/cache/yum/*
    33  
    34  RUN mkdir /output && chown 1000:1000 /output
    35  USER 1000:1000
    36  ENV PATH /bin
    37  ENV HOME /output
    38  WORKDIR /output
    39  ENTRYPOINT ["/bin/openshift-install"]