Pcservercomp / Dockerfile
THEZYZSTUDIO's picture
Update Dockerfile
ec1f651 verified
Raw
History Blame Contribute Delete
1.39 kB
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
ENV DISPLAY=:1
ENV LC_ALL=C.UTF-8
# Base packages + كل الأدوات المطلوبة بـ app.py
RUN apt-get update && apt-get install -y \
python3 python3-pip \
xvfb \
fluxbox \
scrot \
xdotool \
xclip \
xauth \
x11-utils \
x11-apps \
imagemagick \
feh \
ffmpeg \
x11-xserver-utils \
fonts-noto \
fonts-noto-color-emoji \
curl wget ca-certificates \
software-properties-common \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# Install Firefox from Mozilla PPA (stable on Ubuntu 22.04)
RUN add-apt-repository ppa:mozillateam/ppa -y \
&& echo 'Package: *\nPin: release o=LP-PPA-mozillateam\nPin-Priority: 1001' \
> /etc/apt/preferences.d/mozilla-firefox \
&& apt-get update \
&& apt-get install -y firefox \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# firefox-esr symlink — الـ AI يستدعي firefox-esr دائماً
RUN ln -sf $(which firefox) /usr/local/bin/firefox-esr && \
echo "firefox-esr → $(which firefox)" && \
firefox-esr --version
# Python dependencies
COPY requirements.txt /app/requirements.txt
RUN pip3 install --no-cache-dir -r /app/requirements.txt
# App files
WORKDIR /app
COPY app.py /app/app.py
COPY start.sh /app/start.sh
RUN chmod +x /app/start.sh
EXPOSE 7860
CMD ["/app/start.sh"]