Skip to content

Commit

Permalink
Build linux-amd64 binary in installer-artifacts
Browse files Browse the repository at this point in the history
This will be used by oc in the next release to allow extracting an
x86_64 installer from another architecture's payload.

Due to the size of the installer binary, building each in a separate
stage minimizes resource requirements when using imagebuilder.  This
does require a matching change to ocp-build-data to add a second builder
stage.
  • Loading branch information
yselkowitz committed May 12, 2021
1 parent 296b0b1 commit de29846
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions images/installer-artifacts/Dockerfile.rhel
@@ -1,11 +1,18 @@
# This Dockerfile builds an image containing the Mac version of the installer layered
# on top of the Linux installer image.

FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.15-openshift-4.8 AS builder
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.16-openshift-4.8 AS macbuilder
WORKDIR /go/src/github.com/openshift/installer
COPY . .
RUN go generate ./data && \
SKIP_GENERATION=y GOOS=darwin GOARCH=amd64 hack/build.sh

FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.16-openshift-4.8 AS linuxbuilder
WORKDIR /go/src/github.com/openshift/installer
COPY . .
RUN go generate ./data && \
SKIP_GENERATION=y GOOS=linux GOARCH=amd64 hack/build.sh

FROM registry.ci.openshift.org/ocp/4.8:installer
COPY --from=builder /go/src/github.com/openshift/installer/bin/openshift-install /usr/share/openshift/mac/openshift-install
COPY --from=macbuilder /go/src/github.com/openshift/installer/_output/bin/darwin_amd64/openshift-install /usr/share/openshift/mac/openshift-install
COPY --from=linuxbuilder /go/src/github.com/openshift/installer/_output/bin/linux_amd64/openshift-install /usr/share/openshift/linux_amd64/openshift-install

0 comments on commit de29846

Please sign in to comment.