github.com/openshift/installer@v1.4.17/images/libvirt/Dockerfile.ci (about) 1 # This Dockerfile is a used by CI to publish an installer image for creating libvirt clusters 2 # It builds an image containing openshift-install and nss-wrapper for remote deployments, as well as the google cloud-sdk for nested GCE environments and 3 # oc for getting assets from an existing cluster to spin up multi-architecture compute clusters on libvirt. 4 5 # The binaries in these images are dynamically linked 6 FROM registry.ci.openshift.org/ocp/4.17:etcd AS etcd 7 FROM registry.ci.openshift.org/ocp/4.17:hyperkube AS kas 8 9 FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.22-openshift-4.17 AS builder 10 ARG TAGS="libvirt fipscapable" 11 ARG SKIP_ENVTEST="y" 12 WORKDIR /go/src/github.com/openshift/installer 13 COPY . . 14 COPY --from=etcd /usr/bin/etcd /usr/bin/etcd 15 COPY --from=kas /usr/bin/kube-apiserver /usr/bin/kube-apiserver 16 RUN mkdir -p cluster-api/bin/$(go env GOOS)_$(go env GOHOSTARCH) && \ 17 mv /usr/bin/etcd /usr/bin/kube-apiserver -t cluster-api/bin/$(go env GOOS)_$(go env GOHOSTARCH)/ 18 RUN DEFAULT_ARCH="$(go env GOHOSTARCH)" hack/build.sh 19 20 FROM registry.ci.openshift.org/ocp/4.17:cli as cli 21 FROM quay.io/multi-arch/yq:3.3.0 as yq3 22 FROM quay.io/multi-arch/yq:4.30.5 as yq4 23 24 FROM quay.io/centos/centos:stream9 25 COPY --from=builder /go/src/github.com/openshift/installer/bin/openshift-install /bin/openshift-install 26 COPY --from=builder /go/src/github.com/openshift/installer/images/libvirt/mock-nss.sh /bin/mock-nss.sh 27 COPY --from=builder /go/src/github.com/openshift/installer/images/libvirt/google-cloud-sdk.repo /etc/yum.repos.d/google-cloud-sdk.repo 28 COPY --from=cli /usr/bin/oc /bin/oc 29 30 RUN yum update -y && \ 31 yum install --setopt=tsflags=nodocs -y \ 32 genisoimage \ 33 gettext \ 34 google-cloud-sdk \ 35 libvirt-client \ 36 libvirt-libs \ 37 nss_wrapper \ 38 openssh-clients \ 39 virt-install \ 40 qemu-kvm && \ 41 yum clean all && rm -rf /var/cache/yum/* 42 43 COPY --from=yq3 /yq /bin/yq-go 44 COPY --from=yq4 /usr/bin/yq /bin/yq-v4 45 # This symlink is provided for backwards compatibility 46 RUN ln -s /bin/yq-go /bin/yq && chmod +x /bin/yq 47 48 RUN mkdir /output && chown 1000:1000 /output 49 USER 1000:1000 50 ENV PATH /bin 51 ENV HOME /output 52 WORKDIR /output