crystal99 commited on
Commit
bfdd190
·
verified ·
1 Parent(s): d600739

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -13
Dockerfile CHANGED
@@ -1,30 +1,26 @@
1
- # Use base Ubuntu image
2
  FROM ubuntu:22.04
3
 
4
- # Avoids prompts during install
5
  ENV DEBIAN_FRONTEND=noninteractive
6
 
7
- # Install packages
8
  RUN apt update && apt install -y \
9
- xfce4 xfce4-goodies tightvncserver \
10
- firefox xterm wget curl git \
11
- novnc websockify python3 python3-pip net-tools supervisor && \
12
  apt clean && rm -rf /var/lib/apt/lists/*
13
 
14
- # Set password for VNC
15
  RUN mkdir -p /root/.vnc && \
16
  echo "huggingface" | vncpasswd -f > /root/.vnc/passwd && \
17
  chmod 600 /root/.vnc/passwd
18
 
19
- # Copy startup script
 
 
 
20
  COPY app.sh /app.sh
21
  RUN chmod +x /app.sh
22
 
23
- # Create launch file for VNC
24
- RUN echo "#!/bin/bash\nstartxfce4 &" > /root/.vnc/xstartup && chmod +x /root/.vnc/xstartup
25
-
26
- # Expose web port
27
  EXPOSE 7860
28
 
29
- # Run script
30
  CMD ["/app.sh"]
 
 
1
  FROM ubuntu:22.04
2
 
 
3
  ENV DEBIAN_FRONTEND=noninteractive
4
 
5
+ # Install desktop environment, VNC, and noVNC
6
  RUN apt update && apt install -y \
7
+ xfce4 xfce4-goodies tightvncserver wget novnc websockify xterm firefox && \
 
 
8
  apt clean && rm -rf /var/lib/apt/lists/*
9
 
10
+ # Set VNC password
11
  RUN mkdir -p /root/.vnc && \
12
  echo "huggingface" | vncpasswd -f > /root/.vnc/passwd && \
13
  chmod 600 /root/.vnc/passwd
14
 
15
+ # xstartup for GUI
16
+ RUN echo "#!/bin/bash\nxrdb $HOME/.Xresources\nstartxfce4 &" > /root/.vnc/xstartup && chmod +x /root/.vnc/xstartup
17
+
18
+ # Copy and allow the startup script
19
  COPY app.sh /app.sh
20
  RUN chmod +x /app.sh
21
 
22
+ # Expose the browser port
 
 
 
23
  EXPOSE 7860
24
 
25
+ # Start script
26
  CMD ["/app.sh"]