Closed miki725 closed 2 weeks ago
Seems like in distroless python images, virtualenv packages cannot be imported when wrapped with chalk:
➜ echo ' FROM debian:11-slim AS build RUN apt-get update && \\ apt-get install --no-install-suggests --no-install-recommends --yes python3-venv gcc libpython3-dev && \\ python3 -m venv /venv && \\ /venv/bin/pip install requests FROM gcr.io/distroless/python3-debian11 COPY --from=build /venv /venv ENTRYPOINT ["/venv/bin/python3", "-c", "import os, pprint; print(os.getcwd()); pprint.pprint(dict(os.environ)); import requests; print(requests.get(\'https://google.com\').status_code)"] ' | ./chalk docker build -t test -f - . --progress=plain; and docker run -it --rm test Traceback (most recent call last): File "<string>", line 1, in <module> ModuleNotFoundError: No module named 'requests'
Seems like in distroless python images, virtualenv packages cannot be imported when wrapped with chalk: