mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-14 05:36:12 +00:00
Add support for building arm, arm64 and ppc64le server and client targets
This commit is contained in:
@@ -20,8 +20,6 @@ FROM KUBE_BUILD_IMAGE_CROSS
|
||||
|
||||
MAINTAINER Joe Beda <jbeda@google.com>
|
||||
|
||||
# (set an explicit GOARM of 5 for maximum compatibility)
|
||||
ENV GOARM 5
|
||||
ENV GOOS linux
|
||||
ENV GOARCH amd64
|
||||
|
||||
@@ -34,8 +32,10 @@ RUN mkdir $TMPDIR && \
|
||||
|
||||
# We use rsync to copy some binaries around. It is faster (0.3s vs. 1.1s) on my
|
||||
# machine vs. `install`
|
||||
RUN rm -rf /var/lib/apt/lists/
|
||||
RUN apt-get -o Acquire::Check-Valid-Until=false update && apt-get install -y rsync
|
||||
RUN rm -rf /var/lib/apt/lists/ \
|
||||
&& apt-get -o Acquire::Check-Valid-Until=false update \
|
||||
&& apt-get install -y rsync \
|
||||
&& rm -rf /var/lib/apt/lists/
|
||||
|
||||
# Download and symlink etcd. We need this for our integration tests.
|
||||
RUN export ETCD_VERSION=v2.2.1; \
|
||||
|
@@ -18,8 +18,13 @@
|
||||
FROM golang:1.4.2
|
||||
MAINTAINER Joe Beda <jbeda@google.com>
|
||||
|
||||
ENV GOARM 6
|
||||
ENV KUBE_DYNAMIC_CROSSPLATFORMS \
|
||||
armel
|
||||
|
||||
ENV KUBE_CROSSPLATFORMS \
|
||||
linux/386 linux/arm \
|
||||
linux/386 \
|
||||
linux/arm \
|
||||
darwin/amd64 darwin/386 \
|
||||
windows/amd64 windows/386
|
||||
|
||||
@@ -38,3 +43,12 @@ RUN apt-get install -y g++ && apt-get clean && rm -rf /var/lib/apt/lists/* &&\
|
||||
rm -rf protobuf-3.0.0-beta-2 &&\
|
||||
protoc --version
|
||||
|
||||
# Use dynamic cgo linking for architectures other than amd64 for the server platforms
|
||||
# More info here: https://wiki.debian.org/CrossToolchains
|
||||
RUN echo "deb http://emdebian.org/tools/debian/ jessie main" > /etc/apt/sources.list.d/cgocrosscompiling.list \
|
||||
&& curl -s http://emdebian.org/tools/debian/emdebian-toolchain-archive.key | apt-key add - \
|
||||
&& for platform in ${KUBE_DYNAMIC_CROSSPLATFORMS}; do dpkg --add-architecture ${platform}; done \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y build-essential \
|
||||
&& for platform in ${KUBE_DYNAMIC_CROSSPLATFORMS}; do apt-get install -y crossbuild-essential-${platform}; done \
|
||||
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||
|
Reference in New Issue
Block a user