Created
September 10, 2013 17:54
-
-
Save crosbymichael/6513052 to your computer and use it in GitHub Desktop.
Golang CrossCompiling image
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Dockerfile for go 1.1.2 cross compile | |
FROM ubuntu | |
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list | |
RUN apt-get update | |
RUN apt-get upgrade -y | |
RUN apt-get install -y mercurial git-core | |
RUN hg clone https://code.google.com/p/go | |
# Maybe checkout the latest go release here | |
ENV GOROOT /go | |
ENV GOBIN /go/bin | |
RUN apt-get install -y gcc g++ make build-essential | |
RUN cd /go/src && ./all.bash | |
ENV PATH $PATH:/go/bin | |
RUN /bin/bash -c "git clone git://github.com/davecheney/golang-crosscompile.git && source golang-crosscompile/crosscompile.bash && go-crosscompile-build-all" | |
# Do some cool stuff here to have a container produce binaries for platforms |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
btw, swapping out
https://code.google.com/p/go
forhttps://code.google.com/p/go#release
will get you the latest release :)