mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-08-30 14:00:12 +03:00
Replace the `xpra=6.4*` version clamp on the apt-get install command line with APT pinning via /etc/apt/preferences.d/pin-xpra. The previous specifier stopped resolving once xpra 6.5 was released: the xpra metapackage was pinned to 6.4 while its sub-packages (xpra-client, xpra-server, xpra-codecs, ...) were unconstrained and defaulted to 6.5, so apt could not satisfy the dependency graph and the "Build Docker images" action failed. Pinning all xpra* packages at the preferences level constrains the whole set consistently (xpra-html5 is handled separately since it follows a different version scheme, locked to v19). Blocking every other version with priority -1 ensures that, if the pinned version ever disappears from the repository, apt fails loudly instead of silently upgrading to the latest release. Fixes GNS3/gns3-registry#1044
63 lines
1.9 KiB
Docker
63 lines
1.9 KiB
Docker
FROM debian:trixie
|
|
|
|
# Prevent interactive prompts during build
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
# Set timezone to UTC
|
|
ENV TZ=UTC
|
|
|
|
# Set UTF-8 locale to avoid Qt warnings
|
|
ENV LANG=C.UTF-8
|
|
ENV LC_ALL=C.UTF-8
|
|
|
|
# Use Alibaba Cloud Debian mirror for faster downloads in China (Debian Trixie uses deb822 format)
|
|
RUN sed -i 's|http://deb.debian.org/debian|http://mirrors.aliyun.com/debian|g' /etc/apt/sources.list.d/debian.sources \
|
|
&& sed -i 's|http://security.debian.org/debian-security|http://mirrors.aliyun.com/debian-security|g' /etc/apt/sources.list.d/debian.sources
|
|
|
|
# Add xpra official repository
|
|
COPY pin-xpra /etc/apt/preferences.d/
|
|
RUN apt-get update && apt-get install -y \
|
|
ca-certificates \
|
|
wget \
|
|
gnupg \
|
|
&& wget -O "/usr/share/keyrings/xpra.asc" https://xpra.org/xpra.asc \
|
|
&& echo "deb [arch=amd64,arm64 signed-by=/usr/share/keyrings/xpra.asc] https://xpra.org trixie main" > /etc/apt/sources.list.d/xpra.list \
|
|
&& apt-get update
|
|
|
|
# Install xpra and dependencies
|
|
# Locking of xpra version is done in /etc/apt/preferences.d/pin-xpra
|
|
RUN apt-get install -y \
|
|
wireshark-common \
|
|
wireshark \
|
|
xpra \
|
|
xpra-x11 \
|
|
xvfb \
|
|
curl \
|
|
x11-utils \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Metadata
|
|
LABEL maintainer="YueGuobin <yueguobin@outlook.com>"
|
|
LABEL description="Web Wireshark container with xpra for GNS3"
|
|
|
|
# Create gns3 user
|
|
RUN groupadd -g 1000 gns3 && \
|
|
useradd -u 1000 -g gns3 -m -s /bin/bash gns3
|
|
|
|
# Create sessions directory with proper permissions
|
|
RUN mkdir -p /tmp/sessions && chmod 1777 /tmp/sessions
|
|
|
|
# Create XDG runtime directory for gns3 user
|
|
RUN mkdir -p /run/user/1000 && chown -R gns3:gns3 /run/user/1000 && chmod 700 /run/user/1000
|
|
|
|
# Set XDG environment variables
|
|
ENV XDG_RUNTIME_DIR=/run/user/1000
|
|
|
|
|
|
# Set default user
|
|
USER gns3
|
|
|
|
# No EXPOSE - port will be dynamically allocated
|
|
# Keep container running
|
|
CMD ["tail", "-f", "/dev/null"]
|