From 5d8d6c16918f11694992e77b59d2f68ca16cce3c Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 1 Mar 2026 13:13:10 +0100 Subject: [PATCH] Slim image by replacing noVNC package Use noVNC static bundle with websockify and trim apt packages to reduce image size while keeping emoji support and VNC tools. --- Dockerfile | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/Dockerfile b/Dockerfile index 867f715..f6801cc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,19 +16,18 @@ ENV DISPLAY=:0 \ VNC_DEPTH=24 \ USER=nicotine \ PUID=1000 \ - PGID=1000 + PGID=1000 \ + NOVNC_VERSION=1.3.0 # Install dependencies -RUN apt-get update && apt-get install -y \ +RUN apt-get update && apt-get install -y --no-install-recommends \ # Lightweight window manager openbox \ - xterm \ dbus-x11 \ # VNC server tigervnc-standalone-server \ tigervnc-common \ - # noVNC for web interface - novnc \ + tigervnc-tools \ python3-websockify \ # Nicotine+ dependencies python3 \ @@ -36,19 +35,23 @@ RUN apt-get update && apt-get install -y \ 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 \ + # TLS certificates for pip + ca-certificates \ + # Download tools for noVNC static bundle curl \ - procps \ - net-tools \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* + +# Install noVNC static files (no Node.js dependency) +RUN mkdir -p /usr/share/novnc \ + && curl -fsSL "https://github.com/novnc/noVNC/archive/refs/tags/v${NOVNC_VERSION}.tar.gz" \ + | tar -xz --strip-components=1 -C /usr/share/novnc \ + && rm -rf /usr/share/novnc/utils/websockify \ + && apt-get purge -y --auto-remove curl \ && apt-get clean \ && rm -rf /var/lib/apt/lists/*