Spaces:
Paused
Paused
| 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"] |