Spaces:
Running
Running
Update Dockerfile
Browse files- 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 |
-
#
|
|
|
|
|
|
|
|
|
|
|
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
|
29 |
EXPOSE 7860
|
30 |
|
31 |
# Start tightvncserver and serve via websockify
|
32 |
-
CMD ["bash", "-c", "tightvncserver :1 && websockify --web=/
|
|
|
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"]
|