crystal99 commited on
Commit
d2aa96e
·
verified ·
1 Parent(s): 27d2a44

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +30 -0
Dockerfile ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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"]