File size: 855 Bytes
058a12a
 
3e3d8d9
058a12a
 
 
 
 
28f9432
058a12a
 
 
 
 
 
3e3d8d9
b123d16
 
 
 
 
 
058a12a
 
28f9432
058a12a
b123d16
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# 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"]