Dockerfile 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. # Dockerfile to build an image with the local version of psiphon-tunnel-core.
  2. #
  3. # See README.md for usage instructions.
  4. FROM ubuntu:12.04
  5. ENV GOVERSION=go1.4.1
  6. # Install system-level dependencies.
  7. ENV DEBIAN_FRONTEND=noninteractive
  8. RUN apt-get update && \
  9. apt-get -y install build-essential python-software-properties bzip2 unzip curl \
  10. git subversion mercurial bzr \
  11. upx gcc-mingw-w64-i686 gcc-mingw-w64-x86-64 gcc-multilib
  12. # Install Go.
  13. ENV GOROOT=/go \
  14. GOPATH=/
  15. ENV PATH=$PATH:$GOROOT/bin
  16. RUN echo "INSTALLING GO" && \
  17. curl -L https://github.com/golang/go/archive/$GOVERSION.zip -o /tmp/go.zip && \
  18. unzip /tmp/go.zip && \
  19. rm /tmp/go.zip && \
  20. mv /go-$GOVERSION $GOROOT && \
  21. echo $GOVERSION > $GOROOT/VERSION && \
  22. cd $GOROOT/src && \
  23. ./all.bash
  24. ENV CGO_ENABLED=1
  25. RUN go get github.com/mitchellh/gox && \
  26. go get github.com/inconshreveable/gonative && \
  27. mkdir -p /usr/local/gonative && \
  28. cd /usr/local/gonative && \
  29. gonative build
  30. ENV PATH=/usr/local/gonative/go/bin:$PATH
  31. WORKDIR $GOPATH/src