Files
grpc/examples/python/observability/csm/Dockerfile.server
Xuan Wang 4f3fba65fb [Python CSM] Add example for CSM O11Y (#36829)
Verified that when following User Guide, we're able to collect metrics
and export to GCP.
Images are available at:
*
`us-docker.pkg.dev/grpc-testing/examples/csm-o11y-example-python-client:latest`
*
`us-docker.pkg.dev/grpc-testing/examples/csm-o11y-example-python-server:latest`
<!--

If you know who should review your pull request, please assign it to
that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the
appropriate
lang label.

-->
2024-06-07 11:20:23 -07:00

27 lines
697 B
Docker

FROM python:3.9-slim-bookworm
RUN apt-get update -y && apt-get upgrade -y && apt-get install -y build-essential clang curl
WORKDIR /workdir
RUN ln -s /usr/bin/python3 /usr/bin/python
RUN mkdir /artifacts
COPY . .
RUN tools/bazel build -c dbg //examples/python/observability/csm:csm_greeter_server
RUN cp -rL /workdir/bazel-bin/examples/python/observability/csm/csm_greeter_server* /artifacts/
FROM python:3.9-slim-bookworm
RUN apt-get update -y \
&& apt-get install -y python3 \
&& apt-get -y autoremove \
&& apt-get install -y curl \
&& rm -rf /var/lib/apt/lists/*
RUN ln -s /usr/bin/python3 /usr/bin/python
COPY --from=0 /artifacts ./
ENTRYPOINT ["/csm_greeter_server"]