Alvin3y1 commited on
Commit
4aab618
·
verified ·
1 Parent(s): 0228d8b

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +20 -9
Dockerfile CHANGED
@@ -1,15 +1,26 @@
1
- FROM python:3.11-slim-bookworm
2
 
3
  ENV DEBIAN_FRONTEND=noninteractive
4
 
5
- # 1. Install guacd (The X11-to-Drawing-Command translator) and Xvfb
6
  RUN apt-get update && apt-get install -y \
7
  guacd \
8
  xvfb \
9
- wget curl gnupg \
10
- # Browser Dependencies
11
- libnss3 libatk1.0-0 libatk-bridge2.0-0 libcups2 libdrm2 libgbm1 \
12
- libasound2 libpangocairo-1.0-0 libgtk-3-0 fonts-liberation \
 
 
 
 
 
 
 
 
 
 
 
13
  && rm -rf /var/lib/apt/lists/*
14
 
15
  # 2. Install Opera
@@ -19,16 +30,16 @@ RUN curl -fsSL https://deb.opera.com/archive.key | gpg --dearmor -o /usr/share/k
19
  apt-get update && \
20
  apt-get install -y opera-stable
21
 
22
- # 3. Setup User
23
  RUN useradd -m -u 1000 user
24
  USER user
25
  WORKDIR /home/user/app
26
 
27
- RUN pip install aiortc aiohttp
28
 
29
  COPY --chown=user:user . .
30
 
31
  ENV DISPLAY=:99
32
  EXPOSE 7860
33
 
34
- CMD ["python", "app.py"]
 
1
+ FROM ubuntu:22.04
2
 
3
  ENV DEBIAN_FRONTEND=noninteractive
4
 
5
+ # 1. Install guacd, xvfb, and browser dependencies
6
  RUN apt-get update && apt-get install -y \
7
  guacd \
8
  xvfb \
9
+ python3 \
10
+ python3-pip \
11
+ wget \
12
+ curl \
13
+ gnupg \
14
+ libnss3 \
15
+ libatk1.0-0 \
16
+ libatk-bridge2.0-0 \
17
+ libcups2 \
18
+ libdrm2 \
19
+ libgbm1 \
20
+ libasound2 \
21
+ libpangocairo-1.0-0 \
22
+ libgtk-3-0 \
23
+ fonts-liberation \
24
  && rm -rf /var/lib/apt/lists/*
25
 
26
  # 2. Install Opera
 
30
  apt-get update && \
31
  apt-get install -y opera-stable
32
 
33
+ # 3. Setup User and App
34
  RUN useradd -m -u 1000 user
35
  USER user
36
  WORKDIR /home/user/app
37
 
38
+ RUN pip3 install aiortc aiohttp
39
 
40
  COPY --chown=user:user . .
41
 
42
  ENV DISPLAY=:99
43
  EXPOSE 7860
44
 
45
+ CMD ["python3", "app.py"]