Skip to content

Commit 67c05e1

Browse files
authored
Fix removing gRPC in Dockerfile (#172)
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.
1 parent 80be26b commit 67c05e1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ RUN mkdir workspace && pip install --target workspace ./aws-opentelemetry-distro
1616
# will complain that grpc is not installed, which is more understandable. References:
1717
# * https://github.com/open-telemetry/opentelemetry-operator/blob/b5bb0ae34720d4be2d229dafecb87b61b37699b0/autoinstrumentation/python/requirements.txt#L2
1818
# * https://github.com/MicrosoftDocs/azure-docs/blob/main/articles/azure-functions/recover-python-functions.md#troubleshoot-cannot-import-cygrpc
19+
ENV PYTHONPATH=/operator-build/workspace
1920
RUN pip uninstall opentelemetry-exporter-otlp-proto-grpc -y
2021
RUN pip uninstall grpcio -y
2122

0 commit comments

Comments
 (0)