Dockerfile 572 B

123456789101112131415161718192021222324
  1. # Copyright The OpenTelemetry Authors
  2. # SPDX-License-Identifier: Apache-2.0
  3. ARG BASE_IMAGE=ubuntu:latest
  4. FROM ${BASE_IMAGE} AS grpc
  5. ARG CORES=${nproc}
  6. ARG GRPC_GIT_TAG=v1.45.2
  7. RUN mkdir mkdir -p /opt/third_party/grpc
  8. WORKDIR /opt/third_party/grpc
  9. ADD CMakeLists.txt /opt/third_party/grpc
  10. RUN mkdir build \
  11. && cd build \
  12. && cmake -DCMAKE_INSTALL_PREFIX=/opt/third_party/install \
  13. -DGRPC_GIT_TAG=${GRPC_GIT_TAG} /opt/third_party/grpc \
  14. && cmake --build . -j ${CORES} --target install
  15. FROM scratch as final
  16. COPY --from=grpc /opt/third_party/install /