FROM ubuntu:22.04 ENV DEBIAN_FRONTEND=noninteractive # Expose the standard Hugging Face port EXPOSE 7860 USER root RUN dpkg --add-architecture i386 && \ apt-get update && \ apt-get install -y --no-install-recommends \ wget ca-certificates gdebi-core xvfb curl \ python3 nodejs npm x11vnc novnc \ dbus-x11 dbus-user-session \ libgl1:i386 libdrm2:i386 libx11-6:i386 \ libnss3 lsof pkexec xdg-user-dirs xterm xz-utils zenity \ && rm -rf /var/lib/apt/lists/* # Install Steam RUN wget https://repo.steampowered.com/steam/archive/precise/steam_latest.deb -O steam.deb && \ apt-get install -y ./steam.deb || apt-get install -y -f && rm steam.deb # Setup User RUN useradd -m -u 1000 user USER user ENV HOME=/home/user WORKDIR $HOME # Create the startup script RUN echo '#!/bin/bash\n\ # 1. Setup Virtual Display\n\ Xvfb :99 -screen 0 1280x720x16 &\n\ export DISPLAY=:99\n\ sleep 2\n\ # 2. Start VNC (View-only for the public, no password needed)\n\ x11vnc -display :99 -viewonly -forever -shared -nopw &\n\ # 3. Start noVNC (The web bridge to the screen)\n\ /usr/share/novnc/utils/launch.sh --vnc localhost:5900 --listen 7860 &\n\ # 4. Start the Bot!\n\ node bot.js\n\ ' > entrypoint.sh && chmod +x entrypoint.sh CMD ["./entrypoint.sh"]