github.com/psiphon-labs/psiphon-tunnel-core@v2.0.28+incompatible/ClientLibrary/Dockerfile (about) 1 # Dockerfile to build the Psiphon Client Library for multiple platforms. 2 # 3 # See README.md for usage instructions. 4 5 FROM ubuntu:18.04 6 7 # Install system-level dependencies. 8 ENV DEBIAN_FRONTEND=noninteractive 9 RUN apt-get update -y && apt-get install -y --no-install-recommends \ 10 build-essential \ 11 ca-certificates \ 12 curl \ 13 gcc-mingw-w64-i686 \ 14 gcc-mingw-w64-x86-64 \ 15 gcc-multilib \ 16 git \ 17 python \ 18 unzip \ 19 && apt-get clean \ 20 && rm -rf /var/lib/apt/lists/* 21 22 # Install Go. 23 # NOTE: Go 1.10+ is required to build c-shared for windows (https://github.com/golang/go/commit/bb0bfd002ada7e3eb9198d4287b32c2fed6e8da6) 24 ENV GOVERSION=go1.17.13 GOROOT=/usr/local/go GOPATH=/go PATH=$PATH:/usr/local/go/bin:/go/bin CGO_ENABLED=1 25 26 RUN curl -L https://storage.googleapis.com/golang/$GOVERSION.linux-amd64.tar.gz -o /tmp/go.tar.gz \ 27 && tar -C /usr/local -xzf /tmp/go.tar.gz \ 28 && rm /tmp/go.tar.gz \ 29 && echo $GOVERSION > $GOROOT/VERSION 30 31 # Setup Android Environment. 32 ENV ANDROID_NDK_VERSION=r17b 33 ENV ANDROID_NDK_TOOLCHAIN_ROOT=/android-ndk-toolchain 34 35 # Setup Android NDK 36 RUN cd /tmp \ 37 && curl https://dl.google.com/android/repository/android-ndk-${ANDROID_NDK_VERSION}-linux-x86_64.zip -o /tmp/android-ndk.zip \ 38 && unzip /tmp/android-ndk.zip -d / \ 39 && mkdir -p /android-ndk-toolchain \ 40 && /android-ndk-${ANDROID_NDK_VERSION}/build/tools/make_standalone_toolchain.py --arch arm --install-dir /android-ndk-toolchain/arm \ 41 && /android-ndk-${ANDROID_NDK_VERSION}/build/tools/make_standalone_toolchain.py --arch arm64 --install-dir /android-ndk-toolchain/arm64 42 43 WORKDIR $GOPATH/src/github.com/Psiphon-Labs/psiphon-tunnel-core/ClientLibrary