content: # TEMPLATE DESCRIPTION: Kali Linux (Lightweight, Pentest CLI Tools)
  FROM kalilinux/kali-rolling:latest
  ARG HOST_UID=1000
  ARG HOST_GID=1000
  
  ENV VIRTUAL_ENV=/opt/venv PATH="/opt/venv/bin:$PATH"
  
  # Turn off interactive requests
  ENV DEBIAN_FRONTEND=noninteractive
  
  # Essential tools only
  RUN apt-get update && apt-get install -y \
      kali-linux-headless \
      curl \
      wget \
      git \
      vim \
      nano \
      htop \
      jq \
      unzip \
      sudo \
      build-essential \
      python3 \
      python3-pip \
      python3-venv \
      python3-dev \
      && python3 -m venv /opt/venv \
      && /opt/venv/bin/pip install --upgrade pip \
      && /opt/venv/bin/pip install \
          requests \
          scapy \
          pwntools \
          netaddr \
          paramiko \
      && rm -rf /var/lib/apt/lists/*
  
  # Minimal pentest set
  RUN apt-get update && apt-get install -y \
      nmap \
      nikto \
      gobuster \
      ffuf \
      wfuzz \
      sqlmap \
      dirb \
      whois \
      dnsutils \
      netcat-traditional \
      socat \
      traceroute \
      && rm -rf /var/lib/apt/lists/*
  
  # Create user
  RUN groupadd -g ${HOST_GID} sandbox-group 2>/dev/null || true && \
      useradd -u ${HOST_UID} -g ${HOST_GID} -m -s /bin/bash sandbox-user && \
      echo "sandbox-user:kali123" | chpasswd && \
      usermod -aG sudo sandbox-user && \
      echo "sandbox-user ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers && \
      echo "Defaults !requiretty" >> /etc/sudoers
  
  USER sandbox-user
  WORKDIR /home/sandbox-user
  
  # Aliases + welcome
  RUN echo 'alias ll="ls -la"' >> /home/sandbox-user/.bashrc && \
      echo 'alias ff="ffuf -c"' >> /home/sandbox-user/.bashrc && \
      echo 'echo "Lightweight Kali ready. Tools: nmap, gobuster, ffuf, wfuzz, sqlmap."' >> /home/sandbox-user/.bashrc && \
      echo 'echo "Python libs: scapy, requests, pwntools, paramiko"' >> /home/sandbox-user/.bashrc
  
  ENV HOME=/home/sandbox-user
  
  CMD ["bash"]
  