Skip to content

Commit 53af542

Browse files
Merge pull request openshift#22557 from jeffdyoung/multiarch_builds
Support Mulit-Arch Builds
2 parents fbfe4e9 + 54493bd commit 53af542

File tree

6 files changed

+29
-14
lines changed

6 files changed

+29
-14
lines changed

images/cli/Dockerfile.rhel

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
FROM registry.svc.ci.openshift.org/ocp/builder:golang-1.10 AS builder
22
WORKDIR /go/src/github.com/openshift/origin
33
COPY . .
4-
RUN make build WHAT=cmd/oc
4+
RUN make build WHAT=cmd/oc; \
5+
mkdir -p /tmp/build; \
6+
cp /go/src/github.com/openshift/origin/_output/local/bin/linux/$(go env GOARCH)/oc /tmp/build/oc
57

68
FROM registry.svc.ci.openshift.org/ocp/4.0:base
7-
COPY --from=builder /go/src/github.com/openshift/origin/_output/local/bin/linux/amd64/oc /usr/bin/
9+
COPY --from=builder /tmp/build/oc /usr/bin/
810
RUN for i in kubectl openshift-deploy openshift-docker-build openshift-sti-build openshift-git-clone openshift-manage-dockerfile openshift-extract-image-content openshift-recycle; do ln -s /usr/bin/oc /usr/bin/$i; done
911
LABEL io.k8s.display-name="OpenShift Client" \
1012
io.k8s.description="OpenShift is a platform for developing, building, and deploying containerized applications." \

images/hyperkube/Dockerfile.rhel

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
FROM registry.svc.ci.openshift.org/ocp/builder:golang-1.10 AS builder
22
WORKDIR /go/src/github.com/openshift/origin
33
COPY . .
4-
RUN make build WHAT=vendor/k8s.io/kubernetes/cmd/hyperkube
4+
RUN make build WHAT=vendor/k8s.io/kubernetes/cmd/hyperkube; \
5+
mkdir -p /tmp/build; \
6+
cp /go/src/github.com/openshift/origin/_output/local/bin/linux/$(go env GOARCH)/hyperkube /tmp/build/hyperkube
57

68
FROM registry.svc.ci.openshift.org/ocp/4.0:base
7-
COPY --from=builder /go/src/github.com/openshift/origin/_output/local/bin/linux/amd64/hyperkube /usr/bin/
9+
COPY --from=builder /tmp/build/hyperkube /usr/bin/
810
LABEL io.k8s.display-name="OpenShift Kubernetes Server Commands" \
911
io.k8s.description="OpenShift is a platform for developing, building, and deploying containerized applications." \
1012
io.openshift.tags="openshift,hyperkube" \

images/hypershift/Dockerfile.rhel

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
FROM registry.svc.ci.openshift.org/ocp/builder:golang-1.10 AS builder
22
WORKDIR /go/src/github.com/openshift/origin
33
COPY . .
4-
RUN make build WHAT=cmd/hypershift
4+
RUN make build WHAT=cmd/hypershift; \
5+
mkdir -p /tmp/build; \
6+
cp /go/src/github.com/openshift/origin/_output/local/bin/linux/$(go env GOARCH)/hypershift /tmp/build/hypershift
57

68
FROM registry.svc.ci.openshift.org/ocp/4.0:base
7-
COPY --from=builder /go/src/github.com/openshift/origin/_output/local/bin/linux/amd64/hypershift /usr/bin/
9+
COPY --from=builder /tmp/build/hypershift /usr/bin/
810
LABEL io.k8s.display-name="OpenShift Server Commands" \
911
io.k8s.description="OpenShift is a platform for developing, building, and deploying containerized applications." \
1012
io.openshift.tags="openshift,hypershift"

images/sdn/Dockerfile.rhel

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,17 @@ RUN make build WHAT=" \
77
vendor/github.com/containernetworking/plugins/plugins/ipam/host-local \
88
vendor/github.com/containernetworking/plugins/plugins/main/loopback \
99
"
10+
RUN mkdir -p /tmp/build; \
11+
cp /go/src/github.com/openshift/origin/_output/local/bin/linux/$(go env GOARCH)/openshift-sdn /tmp/build/openshift-sdn; \
12+
cp /go/src/github.com/openshift/origin/_output/local/bin/linux/$(go env GOARCH)/sdn-cni-plugin /tmp/build/sdn-cni-plugin; \
13+
cp /go/src/github.com/openshift/origin/_output/local/bin/linux/$(go env GOARCH)/loopback /tmp/build/loopback; \
14+
cp /go/src/github.com/openshift/origin/_output/local/bin/linux/$(go env GOARCH)/host-local /tmp/build/host-local
1015

1116
FROM registry.svc.ci.openshift.org/ocp/4.0:base
12-
COPY --from=builder /go/src/github.com/openshift/origin/_output/local/bin/linux/amd64/openshift-sdn /usr/bin/
13-
COPY --from=builder /go/src/github.com/openshift/origin/_output/local/bin/linux/amd64/sdn-cni-plugin /opt/cni/bin/openshift-sdn
14-
COPY --from=builder /go/src/github.com/openshift/origin/_output/local/bin/linux/amd64/loopback /opt/cni/bin/
15-
COPY --from=builder /go/src/github.com/openshift/origin/_output/local/bin/linux/amd64/host-local /opt/cni/bin/
17+
COPY --from=builder /tmp/build/openshift-sdn /usr/bin/
18+
COPY --from=builder /tmp/build/sdn-cni-plugin /opt/cni/bin/openshift-sdn
19+
COPY --from=builder /tmp/build/loopback /opt/cni/bin/
20+
COPY --from=builder /tmp/build/host-local /opt/cni/bin/
1621
COPY images/sdn/scripts/* /usr/sbin/
1722

1823
RUN INSTALL_PKGS=" \

images/template-service-broker/Dockerfile.rhel

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
FROM registry.svc.ci.openshift.org/ocp/builder:golang-1.10 AS builder
22
WORKDIR /go/src/github.com/openshift/origin
33
COPY . .
4-
RUN make build WHAT=cmd/template-service-broker
4+
RUN make build WHAT=cmd/template-service-broker; \
5+
mkdir -p /tmp/build; \
6+
cp /go/src/github.com/openshift/origin/_output/local/bin/linux/$(go env GOARCH)/template-service-broker /tmp/build/template-service-broker
57

68
FROM registry.svc.ci.openshift.org/ocp/4.0:base
7-
COPY --from=builder /go/src/github.com/openshift/origin/_output/local/bin/linux/amd64/template-service-broker /usr/bin/
9+
COPY --from=builder /tmp/build/template-service-broker /usr/bin/
810
LABEL io.k8s.display-name="OpenShift Template Service Broker" \
911
io.k8s.description="OpenShift is a platform for developing, building, and deploying containerized applications." \
1012
io.openshift.tags="openshift"

images/tests/Dockerfile.rhel

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
FROM registry.svc.ci.openshift.org/ocp/builder:golang-1.10 AS builder
22
WORKDIR /go/src/github.com/openshift/origin
33
COPY . .
4-
RUN make build WHAT=cmd/openshift-tests
4+
RUN make build WHAT=cmd/openshift-tests; \
5+
mkdir -p /tmp/build; \
6+
cp /go/src/github.com/openshift/origin/_output/local/bin/linux/$(go env GOARCH)/openshift-tests /tmp/build/openshift-tests
57

68
FROM registry.svc.ci.openshift.org/ocp/4.0:cli
7-
COPY --from=builder /go/src/github.com/openshift/origin/_output/local/bin/linux/amd64/openshift-tests /usr/bin/
9+
COPY --from=builder /tmp/build/openshift-tests /usr/bin/
810
RUN yum install --setopt=tsflags=nodocs -y git gzip util-linux && yum clean all && rm -rf /var/cache/yum/* && \
911
git config --system user.name test && \
1012
git config --system user.email [email protected]

0 commit comments

Comments
 (0)