Spaces:
Paused
Paused
File size: 1,478 Bytes
96136e9 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
ENV DISPLAY=:1
ENV GEOMETRY=1280x800
ENV VNC_PASS=123456
ENV NOVNC_PORT=7860
# تثبيت الحزم المطلوبة
RUN apt-get update && apt-get install -y \
firefox-esr \
xvfb \
x11vnc \
wget \
curl \
unzip \
python3 \
python3-pip \
dbus-x11 \
fonts-liberation \
net-tools \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# إعداد كلمة مرور VNC
RUN mkdir -p /root/.vnc && \
x11vnc -storepasswd ${VNC_PASS} /root/.vnc/passwd
# تثبيت noVNC + websockify
RUN mkdir -p /opt/novnc/utils/websockify \
&& wget https://github.com/novnc/noVNC/archive/refs/heads/master.zip -O /tmp/novnc.zip \
&& unzip /tmp/novnc.zip -d /opt \
&& mv /opt/noVNC-master/* /opt/novnc/ \
&& wget https://github.com/novnc/websockify/archive/refs/heads/master.zip -O /tmp/websockify.zip \
&& unzip /tmp/websockify.zip -d /opt \
&& mv /opt/websockify-master/* /opt/novnc/utils/websockify/ \
&& rm -rf /tmp/*.zip
# تثبيت cloudflared
RUN wget -q https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64 -O /usr/local/bin/cloudflared && \
chmod +x /usr/local/bin/cloudflared
# نسخ سكربت البداية
COPY start.sh /start.sh
RUN chmod +x /start.sh
# فتح المنافذ المطلوبة
EXPOSE ${NOVNC_PORT} 5900
# تشغيل سكربت البداية عند بدء الحاوية
CMD ["/start.sh"] |