Azeez98 commited on
Commit
5eabf6f
·
verified ·
1 Parent(s): 8b9ac1c

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -3
Dockerfile CHANGED
@@ -9,7 +9,12 @@ RUN apt update && apt install -y \
9
  xfce4 xfce4-terminal tightvncserver websockify curl wget net-tools \
10
  && apt clean
11
 
12
- # Create a non-root user (since root access isn't available during runtime)
 
 
 
 
 
13
  RUN useradd -m -s /bin/bash kaliuser && \
14
  echo "kaliuser:kaliuser" | chpasswd && \
15
  mkdir -p /home/kaliuser/.vnc && \
@@ -25,8 +30,8 @@ ENV USER=kaliuser
25
  ENV HOME=/home/kaliuser
26
  WORKDIR /home/kaliuser
27
 
28
- # Expose a custom web server (VNC proxy)
29
  EXPOSE 7860
30
 
31
  # Start tightvncserver and serve via websockify
32
- CMD ["bash", "-c", "tightvncserver :1 && websockify --web=/usr/share/novnc 7860 localhost:5901"]
 
9
  xfce4 xfce4-terminal tightvncserver websockify curl wget net-tools \
10
  && apt clean
11
 
12
+ # Download and set up noVNC
13
+ RUN mkdir -p /home/kaliuser/novnc && \
14
+ wget -qO- https://github.com/novnc/noVNC/archive/refs/heads/main.tar.gz | \
15
+ tar xz --strip-components=1 -C /home/kaliuser/novnc
16
+
17
+ # Create a non-root user
18
  RUN useradd -m -s /bin/bash kaliuser && \
19
  echo "kaliuser:kaliuser" | chpasswd && \
20
  mkdir -p /home/kaliuser/.vnc && \
 
30
  ENV HOME=/home/kaliuser
31
  WORKDIR /home/kaliuser
32
 
33
+ # Expose the noVNC port
34
  EXPOSE 7860
35
 
36
  # Start tightvncserver and serve via websockify
37
+ CMD ["bash", "-c", "tightvncserver :1 && websockify --web=/home/kaliuser/novnc 7860 localhost:5901"]