• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2021 The 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# Dockerfile for building //test/cpp/interop:xds_interop_client
16
17FROM python:3.9-slim-bookworm
18
19RUN apt-get update -y && apt-get upgrade -y && apt-get install -y build-essential clang curl
20
21WORKDIR /workdir
22
23RUN ln -s /usr/bin/python3 /usr/bin/python
24RUN mkdir /artifacts
25
26COPY . .
27RUN tools/bazel build //test/cpp/interop:xds_interop_server
28RUN cp -rL /workdir/bazel-bin/test/cpp/interop/xds_interop_server /artifacts/
29
30ENV TINI_VERSION v0.19.0
31ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
32RUN chmod +x /tini
33
34FROM python:3.9-slim-bookworm
35
36ENV GRPC_VERBOSITY="DEBUG"
37ENV GRPC_TRACE="xds_client,xds_resolver,xds_cluster_manager_lb,cds_lb,xds_cluster_resolver_lb,priority_lb,xds_cluster_impl_lb,weighted_target_lb,xds_server_config_fetcher,ring_hash_lb,outlier_detection_lb,xds_wrr_locality_lb,xds_override_host_lb"
38
39RUN apt-get update \
40    && apt-get -y upgrade \
41    && apt-get -y autoremove \
42    && rm -rf /var/lib/apt/lists/*
43
44COPY --from=0 /artifacts ./
45
46# tini serves as PID 1 and enables the server to properly respond to signals.
47COPY --from=0 /tini /tini
48
49ENTRYPOINT ["/tini", "-g", "-vv",  "--",  "/xds_interop_server"]
50