github.com/openshift/installer@v1.4.17/images/installer-artifacts/Dockerfile.rhel (about)

     1  # This Dockerfile builds an image containing Mac and Linux/AMD64 versions of
     2  # the installer layered on top of the cluster-native Linux installer image.
     3  
     4  FROM registry.ci.openshift.org/ocp/4.17:installer-terraform-providers AS providers
     5  # We copy from the -artifacts images because they are statically linked
     6  FROM registry.ci.openshift.org/ocp/4.17:installer-kube-apiserver-artifacts AS kas-artifacts
     7  FROM registry.ci.openshift.org/ocp/4.17:installer-etcd-artifacts AS etcd-artifacts
     8  
     9  # FIPS support is offered via the baremetal-installer image
    10  
    11  FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.22-openshift-4.17 AS macbuilder
    12  ENV GO_COMPLIANCE_EXCLUDE=".*"
    13  ARG TAGS=""
    14  WORKDIR /go/src/github.com/openshift/installer
    15  COPY . .
    16  COPY --from=providers /go/src/github.com/openshift/installer/terraform/bin/darwin_amd64 terraform/bin/darwin_amd64
    17  COPY --from=kas-artifacts /usr/share/openshift/darwin/amd64 cluster-api/bin/darwin_amd64
    18  COPY --from=etcd-artifacts /usr/share/openshift/darwin/amd64 cluster-api/bin/darwin_amd64
    19  RUN GOOS=darwin GOARCH=amd64 DEFAULT_ARCH="$(go env GOHOSTARCH)" hack/build.sh
    20  
    21  FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.22-openshift-4.17 AS macarmbuilder
    22  ENV GO_COMPLIANCE_EXCLUDE=".*"
    23  ARG TAGS=""
    24  WORKDIR /go/src/github.com/openshift/installer
    25  COPY . .
    26  COPY --from=providers /go/src/github.com/openshift/installer/terraform/bin/darwin_arm64 terraform/bin/darwin_arm64
    27  COPY --from=kas-artifacts /usr/share/openshift/darwin/arm64 cluster-api/bin/darwin_arm64
    28  COPY --from=etcd-artifacts /usr/share/openshift/darwin/arm64 cluster-api/bin/darwin_arm64
    29  RUN GOOS=darwin GOARCH=arm64 DEFAULT_ARCH="$(go env GOHOSTARCH)" hack/build.sh
    30  
    31  FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.22-openshift-4.17 AS linuxbuilder
    32  ENV GO_COMPLIANCE_EXCLUDE=".*"
    33  ARG TAGS=""
    34  WORKDIR /go/src/github.com/openshift/installer
    35  COPY . .
    36  COPY --from=providers /go/src/github.com/openshift/installer/terraform/bin/linux_amd64 terraform/bin/linux_amd64
    37  COPY --from=kas-artifacts /usr/share/openshift/linux/amd64 cluster-api/bin/linux_amd64
    38  COPY --from=etcd-artifacts /usr/share/openshift/linux/amd64 cluster-api/bin/linux_amd64
    39  RUN GOOS=linux GOARCH=amd64 DEFAULT_ARCH="$(go env GOHOSTARCH)" hack/build.sh
    40  
    41  FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.22-openshift-4.17 AS linuxarmbuilder
    42  ENV GO_COMPLIANCE_EXCLUDE=".*"
    43  ARG TAGS=""
    44  ARG SKIP_ENVTEST="y"
    45  WORKDIR /go/src/github.com/openshift/installer
    46  COPY . .
    47  COPY --from=providers /go/src/github.com/openshift/installer/terraform/bin/linux_arm64 terraform/bin/linux_arm64
    48  COPY --from=kas-artifacts /usr/share/openshift/linux/arm64 cluster-api/bin/linux_arm64
    49  COPY --from=etcd-artifacts /usr/share/openshift/linux/arm64 cluster-api/bin/linux_arm64
    50  RUN GOOS=linux GOARCH=arm64 DEFAULT_ARCH="$(go env GOHOSTARCH)" hack/build.sh
    51  
    52  FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.22-openshift-4.17 AS builder
    53  ENV GO_COMPLIANCE_EXCLUDE=".*"
    54  ARG TAGS=""
    55  WORKDIR /go/src/github.com/openshift/installer
    56  COPY . .
    57  RUN go run -mod=vendor hack/build-coreos-manifest.go
    58  
    59  FROM registry.ci.openshift.org/ocp/4.17:base-rhel9
    60  COPY --from=macbuilder /go/src/github.com/openshift/installer/bin/openshift-install /usr/share/openshift/mac/openshift-install
    61  COPY --from=macarmbuilder /go/src/github.com/openshift/installer/bin/openshift-install /usr/share/openshift/mac_arm64/openshift-install
    62  COPY --from=linuxbuilder /go/src/github.com/openshift/installer/bin/openshift-install /usr/share/openshift/linux_amd64/openshift-install
    63  COPY --from=linuxarmbuilder /go/src/github.com/openshift/installer/bin/openshift-install /usr/share/openshift/linux_arm64/openshift-install
    64  COPY --from=builder /go/src/github.com/openshift/installer/bin/manifests/ /manifests/
    65  
    66  # We're not really an operator, we're just getting some data into the release image.
    67  LABEL io.openshift.release.operator=true