-
Notifications
You must be signed in to change notification settings - Fork 13
/
Dockerfile
30 lines (22 loc) · 941 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
FROM ubuntu:20.04
ENV DEFAULT_CODE all
ENV BIN_DIR /opt/bin
ENV PKG_DIR /tmp/pkg
ENV GOBIN=/root/go/bin
ENV PATH=$PATH:$GOBIN
ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
COPY pkg/* ${PKG_DIR}/
RUN apt-get update && apt-get install -y software-properties-common
RUN add-apt-repository -y ppa:longsleep/golang-backports
RUN apt-get -y upgrade && apt-get install -y \
$(cat ${PKG_DIR}/apt_packages.txt)
RUN python3 -m pip install --upgrade pip && \
python3 -m pip install --upgrade -r ${PKG_DIR}/pip_requirements.txt
RUN unzip ${PKG_DIR}/protoc-3.6.1-linux-x86_64.zip -d /usr/local
RUN go install github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc@latest
RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
RUN go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
RUN go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway@latest
WORKDIR ${BIN_DIR}
CMD ["python3", "build.py", "-h"]