Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chalk breaks distroless python3 images #327

Closed
miki725 opened this issue Jun 11, 2024 · 0 comments
Closed

Chalk breaks distroless python3 images #327

miki725 opened this issue Jun 11, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@miki725
Copy link
Contributor

miki725 commented Jun 11, 2024

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'
@miki725 miki725 self-assigned this Jun 11, 2024
@miki725 miki725 added the bug Something isn't working label Jun 11, 2024
@miki725 miki725 closed this as completed Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant