Skip to content

Commit

Permalink
Fix removing gRPC in Dockerfile (#172)
Browse files Browse the repository at this point in the history
We are installing using `pip install --target`. To fix this we must set
PYTHONPATH so pip can find and uninstall these packages.

By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.
  • Loading branch information
thpierce committed Apr 22, 2024
1 parent baaf0a3 commit 9d94b92
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ RUN mkdir workspace && pip install --target workspace ./aws-opentelemetry-distro
# will complain that grpc is not installed, which is more understandable. References:
# * https://github.com/open-telemetry/opentelemetry-operator/blob/b5bb0ae34720d4be2d229dafecb87b61b37699b0/autoinstrumentation/python/requirements.txt#L2
# * https://github.com/MicrosoftDocs/azure-docs/blob/main/articles/azure-functions/recover-python-functions.md#troubleshoot-cannot-import-cygrpc
ENV PYTHONPATH=/operator-build/workspace
RUN pip uninstall opentelemetry-exporter-otlp-proto-grpc -y
RUN pip uninstall grpcio -y

Expand Down

0 comments on commit 9d94b92

Please sign in to comment.