Dockerfile 864 B

123456789101112131415161718192021222324252627282930
  1. # Dockerfile to build an image with the local version of psiphon-tunnel-core.
  2. #
  3. # See README.md for usage instructions.
  4. FROM debian:testing
  5. ENV GOVERSION=go1.4
  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. gcc-mingw-w64-i686 upx
  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. GOOS=windows GOARCH=386 CGO_ENABLED=1 CC_FOR_TARGET=/usr/bin/i686-w64-mingw32-gcc ./make.bash
  25. WORKDIR $GOPATH/src