Lightweight Docker container for Nicotine+ with noVNC web interface and Firefox ESR browser. Features: - noVNC web interface with dynamic resize support - Firefox ESR for testing ports and browsing - TigerVNC with AcceptSetDesktopSize enabled - Supervisor for process management - Configurable user/group permissions 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
90 lines
2.1 KiB
Docker
90 lines
2.1 KiB
Docker
FROM debian:bookworm-slim
|
|
|
|
# Metadata
|
|
LABEL maintainer="Nicola"
|
|
LABEL description="Nicotine+ with noVNC web interface and SSH X forwarding support"
|
|
LABEL version="1.0"
|
|
|
|
# Evita prompt interattivi
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
# Variabili d'ambiente
|
|
ENV DISPLAY=:0 \
|
|
VNC_PORT=5900 \
|
|
NOVNC_PORT=6080 \
|
|
VNC_RESOLUTION=1280x720 \
|
|
VNC_DEPTH=24 \
|
|
USER=nicotine \
|
|
PUID=1000 \
|
|
PGID=1000
|
|
|
|
# Installa dipendenze
|
|
RUN apt-get update && apt-get install -y \
|
|
# Window manager leggero
|
|
openbox \
|
|
xterm \
|
|
dbus-x11 \
|
|
# VNC server (solo per noVNC backend)
|
|
tigervnc-standalone-server \
|
|
tigervnc-common \
|
|
# noVNC per interfaccia web
|
|
novnc \
|
|
python3-websockify \
|
|
# Dipendenze Nicotine+
|
|
python3 \
|
|
python3-pip \
|
|
python3-gi \
|
|
python3-gi-cairo \
|
|
gir1.2-gtk-3.0 \
|
|
# Browser leggero
|
|
firefox-esr \
|
|
# Per SSH X forwarding
|
|
xauth \
|
|
# Supervisord per gestire i processi
|
|
supervisor \
|
|
# Utility
|
|
wget \
|
|
curl \
|
|
procps \
|
|
net-tools \
|
|
&& apt-get clean \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Installa Nicotine+ ultima versione
|
|
RUN pip3 install --no-cache-dir --break-system-packages nicotine-plus
|
|
|
|
# Crea utente non-root
|
|
RUN groupadd -g ${PGID} ${USER} && \
|
|
useradd -u ${PUID} -g ${PGID} -m -s /bin/bash ${USER}
|
|
|
|
# Crea directory
|
|
RUN mkdir -p \
|
|
/config \
|
|
/downloads \
|
|
/incomplete \
|
|
/home/${USER}/.config/openbox \
|
|
/home/${USER}/.config/nicotine \
|
|
/home/${USER}/.vnc \
|
|
/var/log/supervisor
|
|
|
|
# Copia configurazioni
|
|
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
|
|
|
|
# Permessi
|
|
RUN chmod +x /usr/local/bin/entrypoint.sh \
|
|
&& chown -R ${USER}:${USER} /home/${USER} /config /downloads /incomplete
|
|
|
|
# Esponi solo noVNC e porte Soulseek
|
|
EXPOSE 6080 2234 2235/udp
|
|
|
|
# Volumi
|
|
VOLUME ["/config", "/downloads", "/incomplete"]
|
|
|
|
WORKDIR /home/${USER}
|
|
|
|
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|
|
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]
|