You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

Dockerfile_cpp 1.4 kB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. FROM ubuntu:22.04
  2. MAINTAINER eesast.com
  3. WORKDIR /usr/local
  4. RUN mkdir /usr/local/PlayerCode
  5. #安装主要工具
  6. RUN apt-get update && apt-get install --no-install-recommends -y gcc g++ make wget ca-certificates cmake autoconf automake libtool curl unzip git
  7. #安装grpc
  8. RUN git clone -b v1.46.3 --depth 1 --shallow-submodules https://gitee.com/mirrors/grpc.git
  9. RUN wget -P . https://cloud.tsinghua.edu.cn/f/1f2713efd9e44255abd6/?dl=1
  10. RUN mv 'index.html?dl=1' third_party.tar.gz
  11. WORKDIR /usr/local/grpc
  12. RUN rm -rf third_party
  13. RUN mv ../third_party.tar.gz .
  14. RUN tar -zxvf third_party.tar.gz
  15. RUN mkdir -p cmake/build
  16. WORKDIR /usr/local/grpc/cmake/build
  17. RUN cmake -DgRPC_INSTALL=ON \
  18. -DgRPC_BUILD_TESTS=OFF \
  19. ../..
  20. RUN make -j$(nproc)
  21. RUN make install
  22. #安装protobuf
  23. WORKDIR /usr/local
  24. RUN git clone https://gitee.com/mirrors/protobuf_source.git ./protobuf
  25. WORKDIR /usr/local/protobuf
  26. RUN git checkout 3.20.x
  27. RUN ./autogen.sh
  28. RUN ./configure
  29. RUN make -j$(nproc)
  30. RUN make install
  31. RUN ldconfig
  32. #RUN git submodule update --init --recursive
  33. #RUN cmake .
  34. #RUN cmake --build . --parallel 10
  35. #RUN make install
  36. COPY ./CAPI /usr/local/PlayerCode/CAPI
  37. COPY ./dependency /usr/local/PlayerCode/dependency
  38. WORKDIR /usr/local/PlayerCode/dependency/proto
  39. RUN ./cpp_output.sh
  40. WORKDIR /usr/local/PlayerCode/dependency/shell
  41. ENTRYPOINT ["bash","./compile.sh"]
  42. #WORKDIR /usr/local/PlayerCode/CAPI/cpp
  43. #RUN cmake ./CMakeLists.txt
  44. #RUN make