THEZYZSTUDIO commited on
Commit
b5ee6cc
·
verified ·
1 Parent(s): b5ac523

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +49 -0
Dockerfile ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM ubuntu:22.04
2
+
3
+ ENV DEBIAN_FRONTEND=noninteractive
4
+ ENV DISPLAY=:1
5
+ ENV LC_ALL=C.UTF-8
6
+
7
+ # Base packages
8
+ RUN apt-get update && apt-get install -y \
9
+ python3 python3-pip \
10
+ xvfb \
11
+ fluxbox \
12
+ scrot \
13
+ xdotool \
14
+ xclip \
15
+ xauth \
16
+ x11-utils \
17
+ imagemagick \
18
+ feh \
19
+ fonts-noto \
20
+ curl wget ca-certificates \
21
+ software-properties-common \
22
+ && apt-get clean && rm -rf /var/lib/apt/lists/*
23
+
24
+ # Install Firefox from Mozilla PPA (stable on Ubuntu 22.04)
25
+ RUN add-apt-repository ppa:mozillateam/ppa -y \
26
+ && echo 'Package: *\nPin: release o=LP-PPA-mozillateam\nPin-Priority: 1001' \
27
+ > /etc/apt/preferences.d/mozilla-firefox \
28
+ && apt-get update \
29
+ && apt-get install -y firefox \
30
+ && apt-get clean && rm -rf /var/lib/apt/lists/*
31
+
32
+ # firefox-esr symlink — الـ AI يستدعي firefox-esr دائماً
33
+ RUN ln -sf $(which firefox) /usr/local/bin/firefox-esr && \
34
+ echo "firefox-esr → $(which firefox)" && \
35
+ firefox-esr --version
36
+
37
+ # Python dependencies
38
+ COPY requirements.txt /app/requirements.txt
39
+ RUN pip3 install --no-cache-dir -r /app/requirements.txt
40
+
41
+ # App files
42
+ WORKDIR /app
43
+ COPY app.py /app/app.py
44
+ COPY start.sh /app/start.sh
45
+ RUN chmod +x /app/start.sh
46
+
47
+ EXPOSE 7860
48
+
49
+ CMD ["/app/start.sh"]