2026-03-15 08:57:36 +00:00
|
|
|
# syntax=docker/dockerfile:1
|
|
|
|
|
# Enables BuildKit features (cache mounts, faster builds)
|
2023-09-01 07:02:42 +00:00
|
|
|
FROM kalilinux/kali-rolling:latest
|
2026-03-15 08:24:03 +00:00
|
|
|
|
2026-03-15 08:57:36 +00:00
|
|
|
LABEL org.opencontainers.image.title="hackingtool" \
|
|
|
|
|
org.opencontainers.image.description="All-in-One Hacking Tool for Security Researchers" \
|
|
|
|
|
org.opencontainers.image.source="https://github.com/Z4nzu/hackingtool" \
|
|
|
|
|
org.opencontainers.image.licenses="MIT"
|
|
|
|
|
|
|
|
|
|
# Install system dependencies
|
|
|
|
|
# - sudo and python3-venv are not needed (container runs as root, venv unused)
|
|
|
|
|
# - --no-install-recommends keeps the layer lean
|
2022-12-02 21:16:16 +00:00
|
|
|
RUN apt-get update && \
|
2026-03-15 08:24:03 +00:00
|
|
|
apt-get install -y --no-install-recommends \
|
2026-03-15 11:04:06 +00:00
|
|
|
git python3-pip python3-venv curl wget php && \
|
2026-03-15 08:24:03 +00:00
|
|
|
rm -rf /var/lib/apt/lists/*
|
2022-12-02 21:16:16 +00:00
|
|
|
|
|
|
|
|
WORKDIR /root/hackingtool
|
2026-03-15 08:57:36 +00:00
|
|
|
|
|
|
|
|
# Copy requirements first so this layer is cached unless requirements change
|
2023-09-01 07:02:42 +00:00
|
|
|
COPY requirements.txt ./
|
2026-03-15 08:24:03 +00:00
|
|
|
|
2026-03-15 08:57:36 +00:00
|
|
|
# --mount=type=cache persists the pip cache across rebuilds (BuildKit only)
|
|
|
|
|
# --break-system-packages required on Kali (PEP 668 externally-managed env)
|
|
|
|
|
RUN --mount=type=cache,target=/root/.cache/pip \
|
|
|
|
|
pip3 install --break-system-packages -r requirements.txt
|
2026-03-15 08:24:03 +00:00
|
|
|
|
2026-03-15 08:57:36 +00:00
|
|
|
# Copy the rest of the source (respects .dockerignore)
|
2022-12-02 21:16:16 +00:00
|
|
|
COPY . .
|
2026-03-15 08:24:03 +00:00
|
|
|
|
2026-03-15 08:57:36 +00:00
|
|
|
# Ensure the tools directory exists for installs performed at runtime
|
2026-03-15 08:24:03 +00:00
|
|
|
RUN mkdir -p /root/.hackingtool/tools
|
|
|
|
|
|
|
|
|
|
ENTRYPOINT ["python3", "/root/hackingtool/hackingtool.py"]
|