Skip to content

Commit

Permalink
Merge pull request kubernetes#1472 from proppy/master
Browse files Browse the repository at this point in the history
build-image: use golang:cross
  • Loading branch information
jbeda committed Sep 29, 2014
2 parents 648d91b + d728d00 commit cbdf3c7
Showing 1 changed file with 1 addition and 25 deletions.
26 changes: 1 addition & 25 deletions build/build-image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,38 +14,14 @@

# This file creates a standard build environment for building Kubernetes

FROM google/debian:wheezy
FROM golang:cross
MAINTAINER Joe Beda <jbeda@google.com>

RUN apt-get update -y && apt-get install --no-install-recommends -y -q \
curl \
build-essential \
ca-certificates \
git \
mercurial \
rsync

# Install Go
# Save the SHA1 checksum from http://golang.org/dl
RUN echo '9f9dfcbcb4fa126b2b66c0830dc733215f2f056e go1.3.src.tar.gz' > go1.3.src.tar.gz.sha1
RUN curl -O -s https://storage.googleapis.com/golang/go1.3.src.tar.gz
RUN sha1sum --check go1.3.src.tar.gz.sha1
RUN tar -xzf go1.3.src.tar.gz -C /usr/local
ENV PATH /usr/local/go/bin:$PATH
RUN cd /usr/local/go/src && ./make.bash --no-clean 2>&1

# Compile Go for cross compilation
ENV KUBE_CROSSPLATFORMS \
linux/386 linux/arm \
darwin/amd64 darwin/386
# (set an explicit GOARM of 5 for maximum compatibility)
ENV GOARM 5
RUN cd /usr/local/go/src && \
bash -xc 'for platform in $KUBE_CROSSPLATFORMS; do GOOS=${platform%/*} GOARCH=${platform##*/} ./make.bash --no-clean 2>&1; done'

# Set up Go Environment
ENV PATH /go/bin:$PATH
ENV GOPATH /go
ENV GOOS linux
ENV GOARCH amd64

Expand Down

0 comments on commit cbdf3c7

Please sign in to comment.