Azeez98 commited on
Commit
058a12a
·
verified ·
1 Parent(s): 8cf70f6

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +20 -24
Dockerfile CHANGED
@@ -1,29 +1,25 @@
1
- FROM ubuntu:20.04
 
2
 
3
- # Set DEBIAN_FRONTEND to noninteractive to avoid interactive prompts during package installation
4
- ENV DEBIAN_FRONTEND=noninteractive
 
 
 
5
 
6
- # Update and fix broken packages, then install necessary packages
7
- RUN apt-get update && apt-get install -y --fix-missing \
8
- tzdata \
9
- x11vnc \
10
- xvfb \
11
- lxde-core \
12
- lxterminal \
13
- tightvncserver \
14
- wget \
15
- && apt-get install -y --fix-broken \
16
- && apt-get clean
17
 
18
- # Set the timezone to UTC (or your preferred timezone)
19
- RUN ln -snf /usr/share/zoneinfo/UTC /etc/localtime && echo "UTC" > /etc/timezone
20
 
21
- # Install noVNC
22
- RUN mkdir -p /opt/novnc && \
23
- wget -qO- https://github.com/novnc/noVNC/archive/refs/tags/v1.3.0.tar.gz | tar xz --strip 1 -C /opt/novnc
24
 
25
- # Expose the necessary port for noVNC
26
- EXPOSE 6080
27
-
28
- # Start VNC and noVNC
29
- CMD ["sh", "-c", "xvfb-run startlxde & x11vnc -forever -usepw -create & /opt/novnc/utils/novnc_proxy --vnc localhost:5900"]
 
1
+ # Use the official Kali Linux image
2
+ FROM kalilinux/kali-rolling
3
 
4
+ # Update and install necessary packages
5
+ RUN apt update && apt install -y \
6
+ xfce4 xfce4-terminal tightvncserver novnc \
7
+ websockify curl wget net-tools \
8
+ && apt clean
9
 
10
+ # Set up VNC server with default password and desktop environment
11
+ RUN mkdir -p ~/.vnc && \
12
+ echo "password" | vncpasswd -f > ~/.vnc/passwd && \
13
+ chmod 600 ~/.vnc/passwd && \
14
+ echo "exec startxfce4" > ~/.vnc/xstartup && \
15
+ chmod +x ~/.vnc/xstartup
 
 
 
 
 
16
 
17
+ # Expose the VNC and noVNC ports
18
+ EXPOSE 8080
19
 
20
+ # Add noVNC startup script
21
+ RUN mkdir -p /root/novnc && \
22
+ ln -s /usr/share/novnc/utils/launch.sh /root/novnc/launch.sh
23
 
24
+ # Start noVNC server on container start
25
+ CMD ["bash", "-c", "/root/novnc/launch.sh --vnc localhost:5901 --listen 8080 & tightvncserver :1 && tail -f /dev/null"]