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

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -8
Dockerfile CHANGED
@@ -1,17 +1,15 @@
1
- # Use the official Kali Linux base image
2
  FROM kalilinux/kali-rolling
3
 
4
- # Switch to root temporarily for package installation
5
  USER root
6
 
7
- # Update and install necessary packages
8
  RUN apt update && apt install -y \
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
@@ -24,14 +22,11 @@ RUN useradd -m -s /bin/bash kaliuser && \
24
  chmod +x /home/kaliuser/.vnc/xstartup && \
25
  chown -R kaliuser:kaliuser /home/kaliuser
26
 
27
- # Switch to the non-root user
28
  USER kaliuser
29
  ENV USER=kaliuser
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"]
 
 
1
  FROM kalilinux/kali-rolling
2
 
 
3
  USER root
4
 
5
+ # Install necessary packages
6
  RUN apt update && apt install -y \
7
  xfce4 xfce4-terminal tightvncserver websockify curl wget net-tools \
8
  && apt clean
9
 
10
+ # Download and set up noVNC (stable version)
11
  RUN mkdir -p /home/kaliuser/novnc && \
12
+ wget -qO- https://github.com/novnc/noVNC/archive/refs/tags/v1.4.0.tar.gz | \
13
  tar xz --strip-components=1 -C /home/kaliuser/novnc
14
 
15
  # Create a non-root user
 
22
  chmod +x /home/kaliuser/.vnc/xstartup && \
23
  chown -R kaliuser:kaliuser /home/kaliuser
24
 
 
25
  USER kaliuser
26
  ENV USER=kaliuser
27
  ENV HOME=/home/kaliuser
28
  WORKDIR /home/kaliuser
29
 
 
30
  EXPOSE 7860
31
 
 
32
  CMD ["bash", "-c", "tightvncserver :1 && websockify --web=/home/kaliuser/novnc 7860 localhost:5901"]