From ccf62dd925a8af04d24ac7900dafb270ad9c9bf7 Mon Sep 17 00:00:00 2001 From: anti Date: Sat, 4 Apr 2026 00:31:38 -0300 Subject: [PATCH] Fix pip install cross-distro compat: use ENV PIP_BREAK_SYSTEM_PACKAGES=1 --break-system-packages was added in pip 23 (Debian Bookworm). Ubuntu 22.04 ships pip 22 which rejects the flag with exit code 2. Switch to the PIP_BREAK_SYSTEM_PACKAGES env var instead: recognized by pip>=23, silently ignored by pip<23 where PEP 668 is not enforced anyway. Co-Authored-By: Claude Sonnet 4.6 --- templates/docker_api/Dockerfile | 3 ++- templates/ftp/Dockerfile | 3 ++- templates/http/Dockerfile | 3 ++- templates/k8s/Dockerfile | 3 ++- templates/rdp/Dockerfile | 3 ++- templates/smb/Dockerfile | 3 ++- 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/templates/docker_api/Dockerfile b/templates/docker_api/Dockerfile index 2f46fe4..60a2d3d 100644 --- a/templates/docker_api/Dockerfile +++ b/templates/docker_api/Dockerfile @@ -5,7 +5,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ python3 python3-pip \ && rm -rf /var/lib/apt/lists/* -RUN pip3 install --no-cache-dir --break-system-packages flask +ENV PIP_BREAK_SYSTEM_PACKAGES=1 +RUN pip3 install --no-cache-dir flask COPY docker_api_honeypot.py /opt/docker_api_honeypot.py COPY entrypoint.sh /entrypoint.sh diff --git a/templates/ftp/Dockerfile b/templates/ftp/Dockerfile index 737ed17..7c7a48b 100644 --- a/templates/ftp/Dockerfile +++ b/templates/ftp/Dockerfile @@ -5,7 +5,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ python3 python3-pip \ && rm -rf /var/lib/apt/lists/* -RUN pip3 install --no-cache-dir --break-system-packages twisted jinja2 +ENV PIP_BREAK_SYSTEM_PACKAGES=1 +RUN pip3 install --no-cache-dir twisted jinja2 COPY ftp_honeypot.py /opt/ftp_honeypot.py COPY entrypoint.sh /entrypoint.sh diff --git a/templates/http/Dockerfile b/templates/http/Dockerfile index 5c0f6c7..6e78745 100644 --- a/templates/http/Dockerfile +++ b/templates/http/Dockerfile @@ -5,7 +5,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ python3 python3-pip \ && rm -rf /var/lib/apt/lists/* -RUN pip3 install --no-cache-dir --break-system-packages flask jinja2 +ENV PIP_BREAK_SYSTEM_PACKAGES=1 +RUN pip3 install --no-cache-dir flask jinja2 COPY http_honeypot.py /opt/http_honeypot.py COPY entrypoint.sh /entrypoint.sh diff --git a/templates/k8s/Dockerfile b/templates/k8s/Dockerfile index de638e0..2756caa 100644 --- a/templates/k8s/Dockerfile +++ b/templates/k8s/Dockerfile @@ -5,7 +5,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ python3 python3-pip \ && rm -rf /var/lib/apt/lists/* -RUN pip3 install --no-cache-dir --break-system-packages flask +ENV PIP_BREAK_SYSTEM_PACKAGES=1 +RUN pip3 install --no-cache-dir flask COPY k8s_honeypot.py /opt/k8s_honeypot.py COPY entrypoint.sh /entrypoint.sh diff --git a/templates/rdp/Dockerfile b/templates/rdp/Dockerfile index 6ad04d1..7e6ebb5 100644 --- a/templates/rdp/Dockerfile +++ b/templates/rdp/Dockerfile @@ -5,7 +5,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ python3 python3-pip \ && rm -rf /var/lib/apt/lists/* -RUN pip3 install --no-cache-dir --break-system-packages twisted jinja2 +ENV PIP_BREAK_SYSTEM_PACKAGES=1 +RUN pip3 install --no-cache-dir twisted jinja2 COPY rdp_honeypot.py /opt/rdp_honeypot.py COPY entrypoint.sh /entrypoint.sh diff --git a/templates/smb/Dockerfile b/templates/smb/Dockerfile index 4910053..79c62ee 100644 --- a/templates/smb/Dockerfile +++ b/templates/smb/Dockerfile @@ -5,7 +5,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ python3 python3-pip \ && rm -rf /var/lib/apt/lists/* -RUN pip3 install --no-cache-dir --break-system-packages impacket jinja2 +ENV PIP_BREAK_SYSTEM_PACKAGES=1 +RUN pip3 install --no-cache-dir impacket jinja2 COPY smb_honeypot.py /opt/smb_honeypot.py COPY entrypoint.sh /entrypoint.sh