Akwbw commited on
Commit
422985f
·
verified ·
1 Parent(s): 8255c62

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -8
Dockerfile CHANGED
@@ -1,6 +1,6 @@
1
  FROM ubuntu:22.04
2
 
3
- # 1. Install Desktop, Chrome & Python
4
  ENV DEBIAN_FRONTEND=noninteractive
5
  RUN apt-get update && apt-get install -y \
6
  xfce4 \
@@ -8,32 +8,37 @@ RUN apt-get update && apt-get install -y \
8
  xvfb \
9
  python3 \
10
  python3-pip \
 
 
11
  scrot \
12
  chromium-browser \
13
  x11-utils \
14
- xdotool \
15
  && apt-get clean
16
 
17
  # 2. Setup Directory
18
  WORKDIR /app
19
 
20
- # 3. Install Python Libs
21
  COPY requirements.txt .
22
  RUN pip3 install --no-cache-dir -r requirements.txt
23
 
24
  # 4. Environment Variables
25
  ENV DISPLAY=:99
26
- ENV SCREEN_RESOLUTION=1024x768
27
 
28
- # 5. Copy Scripts
 
 
 
29
  COPY . .
30
 
31
- # 6. Permissions
32
  RUN chmod +x start.sh
33
  RUN chmod -R 777 /app
34
 
35
- # 7. Expose Port
36
  EXPOSE 7860
37
 
38
- # 8. Start via Shell Script (Important)
39
  CMD ["/bin/bash", "start.sh"]
 
1
  FROM ubuntu:22.04
2
 
3
+ # 1. Install System Tools
4
  ENV DEBIAN_FRONTEND=noninteractive
5
  RUN apt-get update && apt-get install -y \
6
  xfce4 \
 
8
  xvfb \
9
  python3 \
10
  python3-pip \
11
+ python3-tk \
12
+ python3-dev \
13
  scrot \
14
  chromium-browser \
15
  x11-utils \
16
+ xauth \
17
  && apt-get clean
18
 
19
  # 2. Setup Directory
20
  WORKDIR /app
21
 
22
+ # 3. Python Libs
23
  COPY requirements.txt .
24
  RUN pip3 install --no-cache-dir -r requirements.txt
25
 
26
  # 4. Environment Variables
27
  ENV DISPLAY=:99
28
+ ENV XAUTHORITY=/root/.Xauthority
29
 
30
+ # 5. Create Dummy Xauthority (The Fix)
31
+ RUN touch /root/.Xauthority
32
+
33
+ # 6. Copy Files
34
  COPY . .
35
 
36
+ # 7. Permissions
37
  RUN chmod +x start.sh
38
  RUN chmod -R 777 /app
39
 
40
+ # 8. Expose Port
41
  EXPOSE 7860
42
 
43
+ # 9. Start
44
  CMD ["/bin/bash", "start.sh"]