mirror of
https://github.com/usestrix/strix.git
synced 2026-08-16 09:26:39 +02:00
fix(container): keep /app/.venv/bin on the login-shell PATH so python3 finds preinstalled libs (#839)
This commit is contained in:
@@ -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
|
COPY --chown=pentester:pentester strix/tools/proxy/caido_api.py /opt/strix-python/caido_api.py
|
||||||
ENV PYTHONPATH=/opt/strix-python
|
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 && \
|
# Login shells (e.g. `bash -lc`) source /etc/profile, which on Debian/Kali
|
||||||
echo 'export PATH="/home/pentester/go/bin:/home/pentester/.local/bin:/home/pentester/.npm-global/bin:$PATH"' >> /home/pentester/.profile
|
# 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
|
USER root
|
||||||
COPY containers/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
|
COPY containers/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
|
||||||
|
|||||||
Reference in New Issue
Block a user