Last active
August 29, 2015 14:05
-
-
Save jtolio/aa300266d6bff778b7f6 to your computer and use it in GitHub Desktop.
Dockerfile for making a NaCl-targeting Go build environment
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
FROM ubuntu:precise | |
MAINTAINER JT Olds <hello@jtolds.com> | |
RUN apt-get update | |
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y wget unzip ca-certificates python libc6-i386 bzip2 gcc-multilib g++-multilib netbase | |
RUN mkdir -p /tmp/downloads | |
RUN wget -O /tmp/downloads/go.tar.gz https://storage.googleapis.com/golang/go1.3.1.src.tar.gz | |
RUN wget -O /tmp/downloads/nacl.zip http://storage.googleapis.com/nativeclient-mirror/nacl/nacl_sdk/nacl_sdk.zip | |
# both packages are good citizens and put everything in one subfolder | |
RUN tar -xzvf /tmp/downloads/go.tar.gz -C /opt | |
RUN unzip /tmp/downloads/nacl.zip -d /opt | |
RUN rm -rf /tmp/downloads | |
RUN cd /opt/nacl_sdk && ./naclsdk update | |
RUN mkdir -p /opt/gopath/bin | |
RUN ln -nfs /opt/nacl_sdk/pepper_*/tools/sel_ldr_x86_32 /opt/gopath/bin/sel_ldr_x86_32 | |
RUN ln -nfs /opt/nacl_sdk/pepper_*/tools/sel_ldr_x86_64 /opt/gopath/bin/sel_ldr_x86_64 | |
RUN ln -nfs /opt/go/misc/nacl/go_nacl_amd64p32_exec /opt/gopath/bin/go_nacl_amd64p32_exec | |
RUN ln -nfs /opt/go/misc/nacl/go_nacl_386_exec /opt/gopath/bin/go_nacl_386_exec | |
ENV GOROOT /opt/go | |
ENV GOPATH /opt/gopath | |
ENV PATH /usr/sbin:/usr/bin:/sbin:/bin:/opt/go/bin:/opt/gopath/bin | |
ENV GOOS nacl | |
ENV GOARCH 386 | |
RUN cd /opt/go/src && ./make.bash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment