Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +20 -24
Dockerfile
CHANGED
@@ -1,29 +1,25 @@
|
|
1 |
-
|
|
|
2 |
|
3 |
-
#
|
4 |
-
|
|
|
|
|
|
|
5 |
|
6 |
-
#
|
7 |
-
RUN
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
lxterminal \
|
13 |
-
tightvncserver \
|
14 |
-
wget \
|
15 |
-
&& apt-get install -y --fix-broken \
|
16 |
-
&& apt-get clean
|
17 |
|
18 |
-
#
|
19 |
-
|
20 |
|
21 |
-
#
|
22 |
-
RUN mkdir -p /
|
23 |
-
|
24 |
|
25 |
-
#
|
26 |
-
|
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"]
|
|
|
|
|
|