--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 <noreply@anthropic.com>
17 lines
408 B
Docker
17 lines
408 B
Docker
ARG BASE_IMAGE=debian:bookworm-slim
|
|
FROM ${BASE_IMAGE}
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
python3 python3-pip \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
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
|
|
RUN chmod +x /entrypoint.sh
|
|
|
|
EXPOSE 6443 8080
|
|
ENTRYPOINT ["/entrypoint.sh"]
|