From 9f93a8502ce4c8ed56c954a1276f8ecebf351dce Mon Sep 17 00:00:00 2001 From: anti Date: Sat, 4 Apr 2026 05:25:16 -0300 Subject: [PATCH] Fix Cowrie: install from source to preserve data/honeyfs pip install cowrie omits the data/ directory (fake filesystem, passwd, etc.) required at import time. Clone and install from source instead. Co-Authored-By: Claude Sonnet 4.6 --- templates/cowrie/Dockerfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/templates/cowrie/Dockerfile b/templates/cowrie/Dockerfile index 5de21d7..578c21e 100644 --- a/templates/cowrie/Dockerfile +++ b/templates/cowrie/Dockerfile @@ -10,8 +10,11 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ RUN useradd -m -s /bin/bash cowrie WORKDIR /home/cowrie -RUN python3 -m venv cowrie-env \ - && cowrie-env/bin/pip install --no-cache-dir cowrie jinja2 +# pip install strips data/honeyfs — clone source so the fake filesystem is included +RUN git clone --depth 1 https://github.com/cowrie/cowrie.git /tmp/cowrie-src \ + && python3 -m venv cowrie-env \ + && cowrie-env/bin/pip install --no-cache-dir /tmp/cowrie-src jinja2 \ + && rm -rf /tmp/cowrie-src # Authbind to bind port 22 as non-root RUN touch /etc/authbind/byport/22 /etc/authbind/byport/2222 \