1# Copyright 2023 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 15FROM python:3.9-slim-bookworm 16 17RUN apt-get update -y && apt-get upgrade -y && apt-get install -y build-essential clang curl 18 19WORKDIR /workdir 20 21RUN ln -s /usr/bin/python3 /usr/bin/python 22RUN mkdir /artifacts 23 24COPY . . 25RUN OVERRIDE_BAZEL_VERSION=5.4.0 tools/bazel build //examples/cpp/csm:csm_greeter_server 26RUN cp -rL /workdir/bazel-bin/examples/cpp/csm/csm_greeter_server /artifacts/ 27 28FROM python:3.9-slim-bookworm 29 30RUN apt-get update \ 31 && apt-get -y upgrade \ 32 && apt-get -y autoremove \ 33 && apt-get install -y curl 34 35COPY --from=0 /artifacts ./ 36 37ENV GRPC_EXPERIMENTAL_XDS_ENABLE_OVERRIDE_HOST=true 38 39ENTRYPOINT ["/csm_greeter_server"] 40