# Use the official Kali Linux image FROM kalilinux/kali-rolling # Update and install necessary packages RUN apt update && apt install -y \ xfce4 xfce4-terminal tightvncserver novnc \ websockify curl wget net-tools \ && apt clean # Set up VNC server with default password and desktop environment RUN mkdir -p ~/.vnc && \ echo "password" | vncpasswd -f > ~/.vnc/passwd && \ chmod 600 ~/.vnc/passwd && \ echo "exec startxfce4" > ~/.vnc/xstartup && \ chmod +x ~/.vnc/xstartup # Set USER environment variable ENV USER=root # Fix permissions for noVNC launch script RUN chmod +x /usr/share/novnc/utils/launch.sh # Expose the VNC and noVNC ports EXPOSE 8080 # Start noVNC server on container start CMD ["bash", "-c", "/usr/share/novnc/utils/launch.sh --vnc localhost:5901 --listen 8080 & tightvncserver :1 && tail -f /dev/null"]