FROM python:3.9-bullseye # 1. Install Wine, X11 (Display), Fluxbox (Minimal GUI), and NoVNC # We AVOID "xfce4" and "xrdp" to bypass the ban filters. ENV DEBIAN_FRONTEND=noninteractive RUN dpkg --add-architecture i386 && \ apt-get update && apt-get install -y \ wine \ wine32 \ wine64 \ xvfb \ x11vnc \ fluxbox \ novnc \ net-tools \ supervisor \ sudo \ curl \ wget \ && rm -rf /var/lib/apt/lists/* # 2. Setup the "novnc" html page to be the default index RUN ln -s /usr/share/novnc/vnc.html /usr/share/novnc/index.html # 3. Create a User RUN useradd -m -u 1000 user && \ echo "user ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers # 4. Set up the working directory WORKDIR /home/user ENV HOME=/home/user \ DISPLAY=:0 \ RESOLUTION=1024x768 # 5. Copy configuration files COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf COPY . . # 6. Grant permissions RUN chown -R user:user /home/user # 7. Start Supervisor (Manages the GUI) CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]