• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2022 gRPC authors.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#     http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15
16#
17# Stage 1: Build the interop test client and server
18#
19
20FROM debian:bullseye as build
21
22RUN apt-get update && apt-get install -y clang curl git
23
24WORKDIR /grpc
25COPY . .
26
27RUN git submodule update --init --recursive && \
28  /grpc/tools/bazel build test/cpp/interop:observability_interop_test
29
30
31
32#
33# Stage 2:
34#
35# - Copy only the necessary files to reduce Docker image size.
36# - Have an ENTRYPOINT script which will launch the interop test client or server
37#   with the given parameters.
38#
39
40FROM debian:bullseye
41
42ENV GRPC_TRACE environment_autodetect
43ENV GRPC_VERBOSITY debug
44
45
46WORKDIR /usr/share/grpc
47COPY --from=build /grpc/etc/roots.pem .
48
49
50WORKDIR /grpc/bazel-bin/test/cpp/interop
51COPY --from=build /grpc/bazel-bin/test/cpp/interop/observability_interop_server .
52COPY --from=build /grpc/bazel-bin/test/cpp/interop/observability_interop_client .
53
54WORKDIR /grpc/tools/dockerfile/observability-test/cpp
55COPY --from=build /grpc/tools/dockerfile/observability-test/cpp/run.sh .
56
57ENTRYPOINT ["/grpc/tools/dockerfile/observability-test/cpp/run.sh"]
58