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.
This commit is contained in:
2026-03-01 13:13:10 +01:00
parent 2742058a32
commit 5d8d6c1691

View File

@@ -16,19 +16,18 @@ ENV DISPLAY=:0 \
VNC_DEPTH=24 \ VNC_DEPTH=24 \
USER=nicotine \ USER=nicotine \
PUID=1000 \ PUID=1000 \
PGID=1000 PGID=1000 \
NOVNC_VERSION=1.3.0
# Install dependencies # Install dependencies
RUN apt-get update && apt-get install -y \ RUN apt-get update && apt-get install -y --no-install-recommends \
# Lightweight window manager # Lightweight window manager
openbox \ openbox \
xterm \
dbus-x11 \ dbus-x11 \
# VNC server # VNC server
tigervnc-standalone-server \ tigervnc-standalone-server \
tigervnc-common \ tigervnc-common \
# noVNC for web interface tigervnc-tools \
novnc \
python3-websockify \ python3-websockify \
# Nicotine+ dependencies # Nicotine+ dependencies
python3 \ python3 \
@@ -36,19 +35,23 @@ RUN apt-get update && apt-get install -y \
python3-gi \ python3-gi \
python3-gi-cairo \ python3-gi-cairo \
gir1.2-gtk-3.0 \ gir1.2-gtk-3.0 \
# Lightweight browser
firefox-esr \
# For SSH X forwarding
xauth \
# Supervisord to manage processes # Supervisord to manage processes
supervisor \ supervisor \
# Emoji font support # Emoji font support
fonts-noto-color-emoji \ fonts-noto-color-emoji \
# Utilities # TLS certificates for pip
wget \ ca-certificates \
# Download tools for noVNC static bundle
curl \ curl \
procps \ && apt-get clean \
net-tools \ && 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 \ && apt-get clean \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*