From ccca191a216a872ff3b40d4c3ef84d75b1b28276 Mon Sep 17 00:00:00 2001 From: Alex Schapiro Date: Wed, 22 Jul 2026 03:31:08 +0000 Subject: [PATCH] fix(container): keep /app/.venv/bin on the login-shell PATH so python3 finds preinstalled libs --- containers/Dockerfile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/containers/Dockerfile b/containers/Dockerfile index 4c54ddc2..a2f4f8fa 100644 --- a/containers/Dockerfile +++ b/containers/Dockerfile @@ -205,8 +205,13 @@ RUN python3 -m venv /app/.venv && \ COPY --chown=pentester:pentester strix/tools/proxy/caido_api.py /opt/strix-python/caido_api.py ENV PYTHONPATH=/opt/strix-python -RUN echo 'export PATH="/home/pentester/go/bin:/home/pentester/.local/bin:/home/pentester/.npm-global/bin:$PATH"' >> /home/pentester/.bashrc && \ - echo 'export PATH="/home/pentester/go/bin:/home/pentester/.local/bin:/home/pentester/.npm-global/bin:$PATH"' >> /home/pentester/.profile +# Login shells (e.g. `bash -lc`) source /etc/profile, which on Debian/Kali +# hard-resets PATH and drops the image's ENV PATH entries. Re-add the same +# directories here — including /app/.venv/bin — so `python3`/`pip` resolve to +# the venv (which ships requests, httpx, bs4, lxml, pyjwt, cryptography, and the +# Caido SDK) instead of the externally-managed system interpreter. +RUN echo 'export PATH="/home/pentester/go/bin:/home/pentester/.local/bin:/home/pentester/.npm-global/bin:/app/.venv/bin:$PATH"' >> /home/pentester/.bashrc && \ + echo 'export PATH="/home/pentester/go/bin:/home/pentester/.local/bin:/home/pentester/.npm-global/bin:/app/.venv/bin:$PATH"' >> /home/pentester/.profile USER root COPY containers/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh