FROM debian:bookworm-slim # Metadata LABEL maintainer="Nicola" LABEL description="Nicotine+ with noVNC web interface and SSH X forwarding support" LABEL version="1.0" # Avoid interactive prompts ENV DEBIAN_FRONTEND=noninteractive # Environment variables ENV DISPLAY=:0 \ VNC_PORT=5900 \ NOVNC_PORT=6080 \ VNC_RESOLUTION=1280x720 \ VNC_DEPTH=24 \ USER=nicotine \ PUID=1000 \ PGID=1000 # Install dependencies RUN apt-get update && apt-get install -y \ # Lightweight window manager openbox \ xterm \ dbus-x11 \ # VNC server tigervnc-standalone-server \ tigervnc-common \ # noVNC for web interface novnc \ python3-websockify \ # Nicotine+ dependencies python3 \ python3-pip \ python3-gi \ python3-gi-cairo \ gir1.2-gtk-3.0 \ # Lightweight browser firefox-esr \ # For SSH X forwarding xauth \ # Supervisord to manage processes supervisor \ # Emoji font support fonts-noto-color-emoji \ # Utilities wget \ curl \ procps \ net-tools \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* # Install Nicotine+ latest version RUN pip3 install --no-cache-dir --break-system-packages nicotine-plus # Create non-root user RUN groupadd -g ${PGID} ${USER} && \ useradd -u ${PUID} -g ${PGID} -m -s /bin/bash ${USER} # Create directories RUN mkdir -p \ /config \ /downloads \ /incomplete \ /home/${USER}/.config/openbox \ /home/${USER}/.config/nicotine \ /home/${USER}/.vnc \ /var/log/supervisor # Copy configurations COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf COPY entrypoint.sh /usr/local/bin/entrypoint.sh COPY openbox-rc.xml /home/${USER}/.config/openbox/rc.xml COPY index.html /usr/share/novnc/index.html COPY vnc-patched.html /usr/share/novnc/vnc.html COPY vnc-clipboard-bridge.js /usr/share/novnc/vnc-clipboard-bridge.js COPY log-prefix.sh /usr/local/bin/log-prefix.sh # Set permissions RUN chmod +x /usr/local/bin/entrypoint.sh /usr/local/bin/log-prefix.sh \ && chown -R ${USER}:${USER} /home/${USER} /config /downloads /incomplete # Expose noVNC and Soulseek ports EXPOSE 6080 2234 2235/udp # Volumes VOLUME ["/config", "/downloads", "/incomplete"] WORKDIR /home/${USER} ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]