github.com/turingchain2020/turingchain@v1.1.21/build/Dockerfile-run (about) 1 # Base image: https://hub.docker.com/_/golang/ 2 FROM golang:1.9.2 3 4 # Install golint 5 ENV GOPATH /go 6 ENV PATH ${GOPATH}/bin:$PATH 7 8 # Install dep 9 RUN go get -u gopkg.in/alecthomas/gometalinter.v2 \ 10 && gometalinter.v2 -i \ 11 && go get -u github.com/mitchellh/gox \ 12 && go get -u github.com/vektra/mockery/.../ \ 13 && go get -u mvdan.cc/sh/cmd/shfmt \ 14 && go get -u mvdan.cc/sh/cmd/gosh \ 15 && apt install clang-format \ 16 && apt install shellcheck 17 18 # Use speedup source for Chinese Mainland user,if not you can remove it 19 RUN cp /etc/apt/sources.list /etc/apt/sources.list.old \ 20 && sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list 21 22 # Add apt key for LLVM repository 23 RUN wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - \ 24 && echo "deb http://apt.llvm.org/stretch/ llvm-toolchain-stretch-5.0 main" | tee -a /etc/apt/sources.list 25 26 # Install clang from LLVM repository 27 RUN apt-get update && apt-get install -y --no-install-recommends \ 28 clang-5.0 git \ 29 && apt-get clean \ 30 && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 31 32 # Set Clang as default CC 33 ENV set_clang /etc/profile.d/set-clang-cc.sh 34 RUN echo "export CC=clang-5.0" | tee -a ${set_clang} && chmod a+x ${set_clang} 35 36 RUN apt autoremove \ 37 && apt clean && go clean 38 39 COPY protoc-gen-go /usr/bin/ 40 COPY protoc /usr/bin/ 41 42 RUN chmod +x /usr/bin/protoc-gen-go \ 43 && chmod +x /usr/bin/protoc