Upgrade to debian trixie (#581)

* move flavored bookworm dockerfile to a new trixie dockerfile.

* fix opera openbox selector.

* fix remmina dependencies.

* remove chromium explicit bookworm source.

* Update apps to work with trixie (#624)

Co-authored-by: yesBad <me@bad.cash>

* remove SYS_ADMIN capability requirement for Chromium-based Docker images and update documentation accordingly.

* fix chromium package.

* change uBlock Origin to uBlock Origin Lite.

* restore waterfox in build matrix for GHCR workflows.

---------

Co-authored-by: Bad <87938689+yesBad@users.noreply.github.com>
Co-authored-by: yesBad <me@bad.cash>
This commit is contained in:
Miroslav Šedivý
2026-04-02 15:12:21 +02:00
committed by GitHub
parent a2f5f7ec79
commit a597d44680
43 changed files with 129 additions and 709 deletions
+2 -3
View File
@@ -24,9 +24,8 @@ jobs:
include:
- name: firefox
platforms: linux/amd64,linux/arm64,linux/arm/v7
# Temporarily disabled due to Cloudflare blocked download link
#- name: waterfox
# platforms: linux/amd64
- name: waterfox
platforms: linux/amd64
- name: chromium
platforms: linux/amd64,linux/arm64,linux/arm/v7
- name: google-chrome
+1 -2
View File
@@ -25,8 +25,7 @@ jobs:
matrix:
include:
- name: firefox
# Temporarily disabled due to Cloudflare blocked download link
#- name: waterfox
- name: waterfox
- name: chromium
- name: google-chrome
- name: ungoogled-chromium
+2 -2
View File
@@ -26,11 +26,11 @@
"chrome://policy"
],
"ExtensionInstallForcelist": [
"cjpalhdlnbpafiamejdnhcphjbkeiagm;https://clients2.google.com/service/update2/crx",
"ddkjiahejlhfcafbddmgiahcphecmpfh;https://clients2.google.com/service/update2/crx",
"mnjggcdmjocbbbhaepdhchncahnbgone;https://clients2.google.com/service/update2/crx"
],
"ExtensionInstallAllowlist": [
"cjpalhdlnbpafiamejdnhcphjbkeiagm",
"ddkjiahejlhfcafbddmgiahcphecmpfh",
"mnjggcdmjocbbbhaepdhchncahnbgone"
],
"ExtensionInstallBlocklist": [
+1
View File
@@ -1,6 +1,7 @@
[program:brave]
environment=HOME="/home/%(ENV_USER)s",USER="%(ENV_USER)s",DISPLAY="%(ENV_DISPLAY)s"
command=/usr/bin/brave-browser
--no-sandbox
--window-position=0,0
--display=%(ENV_DISPLAY)s
--user-data-dir=/home/neko/.config/brave
+1
View File
@@ -1,6 +1,7 @@
[program:brave]
environment=HOME="/home/%(ENV_USER)s",USER="%(ENV_USER)s",DISPLAY="%(ENV_DISPLAY)s"
command=/bin/entrypoint.sh /usr/bin/brave-browser
--no-sandbox
--window-position=0,0
--display=%(ENV_DISPLAY)s
--user-data-dir=/home/neko/.config/brave
-1
View File
@@ -6,7 +6,6 @@ COPY ./widevinecdm.sh /widevine.sh
#
# install neko chromium
RUN set -eux; \
echo "deb http://ftp.de.debian.org/debian bookworm main" >> /etc/apt/sources.list; \
apt-get update; \
apt-get install -y --no-install-recommends chromium chromium-common chromium-sandbox openbox; \
#
+1 -1
View File
@@ -10,7 +10,7 @@ RUN set -eux; \
apt-get install -y --no-install-recommends software-properties-common; \
# chromium-browser from default repo needs snap to be installed
# and nvidia base is ubuntu not debian
add-apt-repository ppa:system76/pop; \
add-apt-repository ppa:xtradeb/apps; \
apt-get update; \
apt-get install -y --no-install-recommends xz-utils chromium openbox; \
#
+2 -2
View File
@@ -27,11 +27,11 @@
"chrome://policy"
],
"ExtensionInstallForcelist": [
"cjpalhdlnbpafiamejdnhcphjbkeiagm;https://clients2.google.com/service/update2/crx",
"ddkjiahejlhfcafbddmgiahcphecmpfh;https://clients2.google.com/service/update2/crx",
"mnjggcdmjocbbbhaepdhchncahnbgone;https://clients2.google.com/service/update2/crx"
],
"ExtensionInstallAllowlist": [
"cjpalhdlnbpafiamejdnhcphjbkeiagm",
"ddkjiahejlhfcafbddmgiahcphecmpfh",
"mnjggcdmjocbbbhaepdhchncahnbgone"
],
"ExtensionInstallBlocklist": [
+1
View File
@@ -1,6 +1,7 @@
[program:chromium]
environment=HOME="/home/%(ENV_USER)s",USER="%(ENV_USER)s",DISPLAY="%(ENV_DISPLAY)s"
command=/usr/bin/chromium
--no-sandbox
--window-position=0,0
--display=%(ENV_DISPLAY)s
--user-data-dir=/home/neko/.config/chromium
+1
View File
@@ -1,6 +1,7 @@
[program:chromium]
environment=HOME="/home/%(ENV_USER)s",USER="%(ENV_USER)s",DISPLAY="%(ENV_DISPLAY)s"
command=/bin/entrypoint.sh /usr/bin/chromium
--no-sandbox
--window-position=0,0
--display=%(ENV_DISPLAY)s
--user-data-dir=/home/neko/.config/chromium
+2 -2
View File
@@ -26,11 +26,11 @@
"chrome://policy"
],
"ExtensionInstallForcelist": [
"cjpalhdlnbpafiamejdnhcphjbkeiagm;https://clients2.google.com/service/update2/crx",
"ddkjiahejlhfcafbddmgiahcphecmpfh;https://clients2.google.com/service/update2/crx",
"mnjggcdmjocbbbhaepdhchncahnbgone;https://clients2.google.com/service/update2/crx"
],
"ExtensionInstallAllowlist": [
"cjpalhdlnbpafiamejdnhcphjbkeiagm",
"ddkjiahejlhfcafbddmgiahcphecmpfh",
"mnjggcdmjocbbbhaepdhchncahnbgone"
],
"ExtensionInstallBlocklist": [
+1
View File
@@ -1,6 +1,7 @@
[program:google-chrome]
environment=HOME="/home/%(ENV_USER)s",USER="%(ENV_USER)s",DISPLAY="%(ENV_DISPLAY)s"
command=/usr/bin/google-chrome
--no-sandbox
--window-position=0,0
--display=%(ENV_DISPLAY)s
--user-data-dir=/home/neko/.config/google-chrome
@@ -1,6 +1,7 @@
[program:google-chrome]
environment=HOME="/home/%(ENV_USER)s",USER="%(ENV_USER)s",DISPLAY="%(ENV_DISPLAY)s"
command=/bin/entrypoint.sh /usr/bin/google-chrome
--no-sandbox
--window-position=0,0
--display=%(ENV_DISPLAY)s
--user-data-dir=/home/neko/.config/chromium
+1 -1
View File
@@ -4,7 +4,7 @@ FROM $BASE_IMAGE
#
# install kde
RUN set -eux; apt-get update; \
apt-get install -y --no-install-recommends kde-full kwin-x11 sudo; \
apt-get install -y --no-install-recommends kde-full kwin-x11 libkf5config-bin sudo; \
#
# add user to sudoers
usermod -aG sudo neko; \
+2 -2
View File
@@ -26,11 +26,11 @@
"edge://policy"
],
"ExtensionInstallForcelist": [
"cjpalhdlnbpafiamejdnhcphjbkeiagm;https://clients2.google.com/service/update2/crx",
"ddkjiahejlhfcafbddmgiahcphecmpfh;https://clients2.google.com/service/update2/crx",
"mnjggcdmjocbbbhaepdhchncahnbgone;https://clients2.google.com/service/update2/crx"
],
"ExtensionInstallAllowlist": [
"cjpalhdlnbpafiamejdnhcphjbkeiagm",
"ddkjiahejlhfcafbddmgiahcphecmpfh",
"mnjggcdmjocbbbhaepdhchncahnbgone"
],
"ExtensionInstallBlocklist": [
+1
View File
@@ -1,6 +1,7 @@
[program:microsoft-edge]
environment=HOME="/home/%(ENV_USER)s",USER="%(ENV_USER)s",DISPLAY="%(ENV_DISPLAY)s"
command=/usr/bin/microsoft-edge
--no-sandbox
--window-position=0,0
--display=%(ENV_DISPLAY)s
--user-data-dir=/home/neko/.config/microsoft-edge
@@ -1,6 +1,7 @@
[program:microsoft-edge]
environment=HOME="/home/%(ENV_USER)s",USER="%(ENV_USER)s",DISPLAY="%(ENV_DISPLAY)s"
command=/bin/entrypoint.sh /usr/bin/microsoft-edge
--no-sandbox
--window-position=0,0
--display=%(ENV_DISPLAY)s
--user-data-dir=/home/neko/.config/microsoft-edge
+1 -2
View File
@@ -5,8 +5,7 @@ FROM $BASE_IMAGE
RUN set -eux; apt-get update; \
apt-get install -y --no-install-recommends \
remmina-plugin-rdp remmina-plugin-vnc \
# remmina-plugin-x2go # not in bullseye
remmina-plugin-spice remmina-plugin-nx; \
remmina-plugin-x2go remmina-plugin-www; \
# clean up
apt-get clean -y; \
rm -rf /var/lib/apt/lists/* /var/cache/apt/*
+1 -1
View File
@@ -31,7 +31,7 @@ RUN set -eux; apt-get update; \
CHROMIUM_VERSION="$(wget -O - "${API_URL}" 2>/dev/null | jq -r ".tag_name" | sed -e 's/v//' -e 's/-.*//')"; \
EXTENSIONS_DIR="/usr/share/chromium/extensions"; \
EXTENSIONS=( \
cjpalhdlnbpafiamejdnhcphjbkeiagm \
ddkjiahejlhfcafbddmgiahcphecmpfh \
mnjggcdmjocbbbhaepdhchncahnbgone \
); \
mkdir -p "${EXTENSIONS_DIR}"; \
+1 -1
View File
@@ -26,7 +26,7 @@
"chrome://policy"
],
"ExtensionInstallAllowlist": [
"cjpalhdlnbpafiamejdnhcphjbkeiagm",
"ddkjiahejlhfcafbddmgiahcphecmpfh",
"mnjggcdmjocbbbhaepdhchncahnbgone"
],
"ExtensionInstallBlocklist": [
+1 -1
View File
@@ -1,6 +1,6 @@
[program:ungoogled-chromium]
environment=HOME="/home/%(ENV_USER)s",USER="%(ENV_USER)s",DISPLAY="%(ENV_DISPLAY)s"
command=/usr/lib/chromium/chrome-wrapper --window-position=0,0 --display=%(ENV_DISPLAY)s --start-maximized --bwsi --test-type --force-dark-mode --disable-file-system --disable-gpu --disable-software-rasterizer --disable-dev-shm-usage
command=/usr/lib/chromium/chrome-wrapper --window-position=0,0 --display=%(ENV_DISPLAY)s --no-sandbox --start-maximized --bwsi --test-type --force-dark-mode --disable-file-system --disable-gpu --disable-software-rasterizer --disable-dev-shm-usage
stopsignal=INT
autorestart=true
priority=800
+1 -1
View File
@@ -13,7 +13,7 @@ RUN set -eux; apt-get update; \
# install latest version of uBlock Origin and SponsorBlock for YouTube
EXTENSIONS_DIR="/usr/share/chromium/extensions"; \
EXTENSIONS=( \
cjpalhdlnbpafiamejdnhcphjbkeiagm \
ddkjiahejlhfcafbddmgiahcphecmpfh \
mnjggcdmjocbbbhaepdhchncahnbgone \
); \
mkdir -p "${EXTENSIONS_DIR}"; \
+2 -2
View File
@@ -26,11 +26,11 @@
"chrome://policy"
],
"ExtensionInstallForcelist": [
"cjpalhdlnbpafiamejdnhcphjbkeiagm;https://clients2.google.com/service/update2/crx",
"ddkjiahejlhfcafbddmgiahcphecmpfh;https://clients2.google.com/service/update2/crx",
"mnjggcdmjocbbbhaepdhchncahnbgone;https://clients2.google.com/service/update2/crx"
],
"ExtensionInstallAllowlist": [
"cjpalhdlnbpafiamejdnhcphjbkeiagm",
"ddkjiahejlhfcafbddmgiahcphecmpfh",
"mnjggcdmjocbbbhaepdhchncahnbgone"
],
"ExtensionInstallBlocklist": [
+2 -3
View File
@@ -1,8 +1,6 @@
ARG BASE_IMAGE=ghcr.io/m1k1o/neko/base:latest
FROM $BASE_IMAGE
ARG SRC_URL="https://cdn1.waterfox.net/waterfox/releases/latest/linux"
#
# install waterfox
RUN set -eux; apt-get update; \
@@ -10,7 +8,8 @@ RUN set -eux; apt-get update; \
xz-utils bzip2 libgtk-3-0 libdbus-glib-1-2; \
#
# fetch latest release
wget --user-agent="Mozilla/5.0" -O /tmp/waterfox-setup.tar.bz2 "${SRC_URL}"; \
LATEST=$(curl -s https://api.github.com/repos/BrowserWorks/Waterfox/releases/latest | grep -oP '"tag_name": "\K[^"]+'); \
wget -O /tmp/waterfox-setup.tar.bz2 "https://cdn.waterfox.com/waterfox/releases/${LATEST}/Linux_x86_64/waterfox-${LATEST}.tar.bz2"; \
mkdir /usr/lib/waterfox; \
tar -xjf /tmp/waterfox-setup.tar.bz2 -C /usr/lib; \
rm -f /tmp/waterfox-setup.tar.bz2; \
+1 -1
View File
@@ -325,6 +325,6 @@ docker run --rm -i \
-e "RUNTIME_DOCKERFILE=$RUNTIME_DOCKERFILE" \
--workdir /src \
--entrypoint go \
golang:1.24-bullseye \
golang:1.24-trixie \
run utils/docker/main.go \
-i Dockerfile.tmpl -client "$CLIENT_DIST" | build_image $BASE_IMAGE -f - .
+5 -10
View File
@@ -1,4 +1,4 @@
ARG BASE_IMAGE=debian:bullseye-slim
ARG BASE_IMAGE=debian:trixie-slim
FROM $BASE_IMAGE AS runtime
#
@@ -13,9 +13,9 @@ ENV DEBIAN_FRONTEND=noninteractive
RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends \
wget ca-certificates python2 supervisor \
wget ca-certificates supervisor \
pulseaudio dbus-x11 xserver-xorg-video-dummy \
libcairo2 libxcb1 libxrandr2 libxv1 libopus0 libvpx6 \
libcairo2 libxcb1 libxrandr2 libxv1 libopus0 libvpx9 libx264-164 libvo-aacenc0 librtmp1 libxcvt0 \
#
# needed for profile upload preStop hook
zip curl \
@@ -26,13 +26,7 @@ RUN set -eux; \
# gst
gstreamer1.0-plugins-base gstreamer1.0-plugins-good \
gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly \
gstreamer1.0-pulseaudio gstreamer1.0-omx; \
#
# install libxcvt0 (not available in debian:bullseye)
ARCH=$(dpkg --print-architecture); \
wget http://ftp.de.debian.org/debian/pool/main/libx/libxcvt/libxcvt0_0.1.2-1_${ARCH}.deb; \
apt-get install --no-install-recommends ./libxcvt0_0.1.2-1_${ARCH}.deb; \
rm ./libxcvt0_0.1.2-1_${ARCH}.deb; \
gstreamer1.0-pulseaudio; \
#
# create a non-root user
groupadd --gid $USER_GID $USERNAME; \
@@ -52,6 +46,7 @@ RUN set -eux; \
/home/$USERNAME/.config/pulse \
/home/$USERNAME/.local/share/xorg; \
chmod 1777 /var/log/neko; \
chmod 0700 /tmp/runtime-$USERNAME; \
chown $USERNAME /var/log/neko/ /tmp/runtime-$USERNAME; \
chown -R $USERNAME:$USERNAME /home/$USERNAME; \
#
-107
View File
@@ -1,107 +0,0 @@
ARG BASE_IMAGE=debian:bookworm-slim
FROM $BASE_IMAGE AS runtime
#
# set custom user
ARG USERNAME=neko
ARG USER_UID=1000
ARG USER_GID=$USER_UID
#
# install dependencies
ENV DEBIAN_FRONTEND=noninteractive
RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends \
wget ca-certificates supervisor \
pulseaudio dbus-x11 xserver-xorg-video-dummy \
libcairo2 libxcb1 libxrandr2 libxv1 libopus0 libvpx7 libx264-164 libvo-aacenc0 librtmp1 libxcvt0 \
#
# needed for profile upload preStop hook
zip curl \
#
# file chooser handler, clipboard, drop
xdotool xclip libgtk-3-0 \
#
# gst
gstreamer1.0-plugins-base gstreamer1.0-plugins-good \
gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly \
gstreamer1.0-pulseaudio; \
#
# create a non-root user
groupadd --gid $USER_GID $USERNAME; \
useradd --uid $USER_UID --gid $USERNAME --shell /bin/bash --create-home $USERNAME; \
adduser $USERNAME audio; \
adduser $USERNAME video; \
adduser $USERNAME pulse; \
#
# workaround for an X11 problem: http://blog.tigerteufel.de/?p=476
mkdir /tmp/.X11-unix; \
chmod 1777 /tmp/.X11-unix; \
chown $USERNAME /tmp/.X11-unix/; \
#
# make directories for neko
mkdir -p /etc/neko /var/www /var/log/neko \
/tmp/runtime-$USERNAME \
/home/$USERNAME/.config/pulse \
/home/$USERNAME/.local/share/xorg; \
chmod 1777 /var/log/neko; \
chmod 0700 /tmp/runtime-$USERNAME; \
chown $USERNAME /var/log/neko/ /tmp/runtime-$USERNAME; \
chown -R $USERNAME:$USERNAME /home/$USERNAME; \
#
# install fonts
apt-get install -y --no-install-recommends \
# Emojis
fonts-noto-color-emoji \
# Chinese fonts
fonts-arphic-ukai fonts-arphic-uming \
fonts-wqy-zenhei xfonts-intl-chinese xfonts-wqy \
# Japanese fonts
fonts-ipafont-mincho fonts-ipafont-gothic \
fonts-takao-mincho \
# Korean fonts
fonts-unfonts-core \
fonts-wqy-microhei \
# Indian fonts
fonts-indic; \
#
# clean up
apt-get clean -y; \
rm -rf /var/lib/apt/lists/* /var/cache/apt/*
#
# copy runtime configs
COPY --chown=neko:neko .Xresources /home/$USERNAME/.Xresources
COPY dbus /usr/bin/dbus
COPY default.pa /etc/pulse/default.pa
COPY supervisord.conf /etc/neko/supervisord.conf
COPY supervisord.dbus.conf /etc/neko/supervisord.dbus.conf
COPY xorg.conf /etc/neko/xorg.conf
#
# copy runtime folders
COPY --chown=neko:neko icon-theme /home/$USERNAME/.icons/default
COPY fontconfig/* /etc/fonts/conf.d/
COPY fonts /usr/local/share/fonts
#
# set default envs
ENV USER=$USERNAME
ENV DISPLAY=:99.0
ENV PULSE_SERVER=unix:/tmp/pulseaudio.socket
ENV XDG_RUNTIME_DIR=/tmp/runtime-$USERNAME
ENV NEKO_SERVER_BIND=:8080
ENV NEKO_PLUGINS_ENABLED=true
ENV NEKO_PLUGINS_DIR=/etc/neko/plugins/
#
# add healthcheck
HEALTHCHECK --interval=10s --timeout=5s --retries=8 \
CMD wget -O - http://localhost:${NEKO_SERVER_BIND#*:}/health || \
wget --no-check-certificate -O - https://localhost:${NEKO_SERVER_BIND#*:}/health || \
exit 1
#
# run neko
CMD ["/usr/bin/supervisord", "-c", "/etc/neko/supervisord.conf"]
+7 -11
View File
@@ -1,4 +1,4 @@
ARG BASE_IMAGE=debian:bullseye-slim
ARG BASE_IMAGE=debian:trixie-slim
FROM $BASE_IMAGE AS runtime
#
@@ -13,14 +13,14 @@ ENV DEBIAN_FRONTEND=noninteractive
RUN set -eux; \
#
# add non-free repo for intel drivers
echo deb http://deb.debian.org/debian bullseye main contrib non-free > /etc/apt/sources.list; \
echo deb http://deb.debian.org/debian-security/ bullseye-security main contrib non-free >> /etc/apt/sources.list; \
echo deb http://deb.debian.org/debian bullseye-updates main contrib non-free >> /etc/apt/sources.list; \
echo deb http://deb.debian.org/debian trixie main contrib non-free > /etc/apt/sources.list; \
echo deb http://deb.debian.org/debian-security/ trixie-security main contrib non-free >> /etc/apt/sources.list; \
echo deb http://deb.debian.org/debian trixie-updates main contrib non-free >> /etc/apt/sources.list; \
apt-get update; \
apt-get install -y --no-install-recommends \
wget ca-certificates supervisor \
pulseaudio dbus-x11 xserver-xorg-video-dummy \
libcairo2 libxcb1 libxrandr2 libxv1 libopus0 libvpx6 \
libcairo2 libxcb1 libxrandr2 libxv1 libopus0 libvpx9 libx264-164 libvo-aacenc0 librtmp1 libxcvt0 \
#
# intel driver + vaapi
intel-media-va-driver-non-free libva2 vainfo \
@@ -36,12 +36,6 @@ RUN set -eux; \
gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly \
gstreamer1.0-pulseaudio gstreamer1.0-vaapi; \
#
# install libxcvt0 (not available in debian:bullseye)
ARCH=$(dpkg --print-architecture); \
wget http://ftp.de.debian.org/debian/pool/main/libx/libxcvt/libxcvt0_0.1.2-1_${ARCH}.deb; \
apt-get install --no-install-recommends ./libxcvt0_0.1.2-1_${ARCH}.deb; \
rm ./libxcvt0_0.1.2-1_${ARCH}.deb; \
#
# create a non-root user
groupadd --gid $USER_GID $USERNAME; \
useradd --uid $USER_UID --gid $USERNAME --shell /bin/bash --create-home $USERNAME; \
@@ -60,6 +54,7 @@ RUN set -eux; \
/home/$USERNAME/.config/pulse \
/home/$USERNAME/.local/share/xorg; \
chmod 1777 /var/log/neko; \
chmod 0700 /tmp/runtime-$USERNAME; \
chown $USERNAME /var/log/neko/ /tmp/runtime-$USERNAME; \
chown -R $USERNAME:$USERNAME /home/$USERNAME; \
#
@@ -118,6 +113,7 @@ HEALTHCHECK --interval=10s --timeout=5s --retries=8 \
CMD wget -O - http://localhost:${NEKO_SERVER_BIND#*:}/health || \
wget --no-check-certificate -O - https://localhost:${NEKO_SERVER_BIND#*:}/health || \
exit 1
#
# run neko
CMD ["/usr/bin/supervisord", "-c", "/etc/neko/supervisord.conf"]
-119
View File
@@ -1,119 +0,0 @@
ARG BASE_IMAGE=debian:bookworm-slim
FROM $BASE_IMAGE AS runtime
#
# set custom user
ARG USERNAME=neko
ARG USER_UID=1000
ARG USER_GID=$USER_UID
#
# install dependencies
ENV DEBIAN_FRONTEND=noninteractive
RUN set -eux; \
#
# add non-free repo for intel drivers
echo deb http://deb.debian.org/debian bookworm main contrib non-free > /etc/apt/sources.list; \
echo deb http://deb.debian.org/debian-security/ bookworm-security main contrib non-free >> /etc/apt/sources.list; \
echo deb http://deb.debian.org/debian bookworm-updates main contrib non-free >> /etc/apt/sources.list; \
apt-get update; \
apt-get install -y --no-install-recommends \
wget ca-certificates supervisor \
pulseaudio dbus-x11 xserver-xorg-video-dummy \
libcairo2 libxcb1 libxrandr2 libxv1 libopus0 libvpx7 libx264-164 libvo-aacenc0 librtmp1 libxcvt0 \
#
# intel driver + vaapi
intel-media-va-driver-non-free libva2 vainfo \
#
# needed for profile upload preStop hook
zip curl \
#
# file chooser handler, clipboard, drop
xdotool xclip libgtk-3-0 \
#
# gst
gstreamer1.0-plugins-base gstreamer1.0-plugins-good \
gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly \
gstreamer1.0-pulseaudio gstreamer1.0-vaapi; \
#
# create a non-root user
groupadd --gid $USER_GID $USERNAME; \
useradd --uid $USER_UID --gid $USERNAME --shell /bin/bash --create-home $USERNAME; \
adduser $USERNAME audio; \
adduser $USERNAME video; \
adduser $USERNAME pulse; \
#
# workaround for an X11 problem: http://blog.tigerteufel.de/?p=476
mkdir /tmp/.X11-unix; \
chmod 1777 /tmp/.X11-unix; \
chown $USERNAME /tmp/.X11-unix/; \
#
# make directories for neko
mkdir -p /etc/neko /var/www /var/log/neko \
/tmp/runtime-$USERNAME \
/home/$USERNAME/.config/pulse \
/home/$USERNAME/.local/share/xorg; \
chmod 1777 /var/log/neko; \
chmod 0700 /tmp/runtime-$USERNAME; \
chown $USERNAME /var/log/neko/ /tmp/runtime-$USERNAME; \
chown -R $USERNAME:$USERNAME /home/$USERNAME; \
#
# install fonts
apt-get install -y --no-install-recommends \
# Emojis
fonts-noto-color-emoji \
# Chinese fonts
fonts-arphic-ukai fonts-arphic-uming \
fonts-wqy-zenhei xfonts-intl-chinese xfonts-wqy \
# Japanese fonts
fonts-ipafont-mincho fonts-ipafont-gothic \
fonts-takao-mincho \
# Korean fonts
fonts-unfonts-core \
fonts-wqy-microhei \
# Indian fonts
fonts-indic; \
#
# clean up
apt-get clean -y; \
rm -rf /var/lib/apt/lists/* /var/cache/apt/*
#
# copy runtime configs
COPY --chown=neko:neko .Xresources /home/$USERNAME/.Xresources
COPY dbus /usr/bin/dbus
COPY default.pa /etc/pulse/default.pa
COPY supervisord.conf /etc/neko/supervisord.conf
COPY supervisord.dbus.conf /etc/neko/supervisord.dbus.conf
COPY xorg.conf /etc/neko/xorg.conf
COPY intel/add-render-group.sh /usr/bin/add-render-group.sh
COPY intel/supervisord.rendergroup.conf /etc/neko/supervisord/supervisord.rendergroup.conf
#
# copy runtime folders
COPY --chown=neko:neko icon-theme /home/$USERNAME/.icons/default
COPY fontconfig/* /etc/fonts/conf.d/
COPY fonts /usr/local/share/fonts
#
# set default envs
ENV USER=$USERNAME
ENV DISPLAY=:99.0
ENV PULSE_SERVER=unix:/tmp/pulseaudio.socket
ENV XDG_RUNTIME_DIR=/tmp/runtime-$USERNAME
ENV NEKO_SERVER_BIND=:8080
ENV NEKO_PLUGINS_ENABLED=true
ENV NEKO_PLUGINS_DIR=/etc/neko/plugins/
ENV NEKO_HWENC=VAAPI
ENV RENDER_GID=
#
# add healthcheck
HEALTHCHECK --interval=10s --timeout=5s --retries=8 \
CMD wget -O - http://localhost:${NEKO_SERVER_BIND#*:}/health || \
wget --no-check-certificate -O - https://localhost:${NEKO_SERVER_BIND#*:}/health || \
exit 1
#
# run neko
CMD ["/usr/bin/supervisord", "-c", "/etc/neko/supervisord.conf"]
+69 -150
View File
@@ -1,116 +1,71 @@
ARG UBUNTU_RELEASE=20.04
ARG CUDA_VERSION=11.4.3
ARG UBUNTU_RELEASE=24.04
ARG CUDA_VERSION=12.5.1
ARG VIRTUALGL_VERSION=3.1.3-20250409
ARG GSTREAMER_VERSION=1.20
#
# Stage 1: Build gstreamer with nvidia plugins.
#
FROM ubuntu:${UBUNTU_RELEASE} AS gstreamer
ARG GSTREAMER_VERSION
#
# install dependencies
ENV DEBIAN_FRONTEND=noninteractive
RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends \
# Install essentials
curl build-essential ca-certificates git \
# Install pip and ninja
python3-pip python-gi-dev ninja-build \
# Install build deps
autopoint autoconf automake autotools-dev libtool gettext bison flex gtk-doc-tools \
# Install libraries
librtmp-dev \
libvo-aacenc-dev \
libtool-bin \
libgtk2.0-dev \
libgl1-mesa-dev \
libopus-dev \
libpulse-dev \
libssl-dev \
libx264-dev \
libvpx-dev; \
# Install meson
pip3 install meson; \
#
# clean up
apt-get clean -y; \
rm -rf /var/lib/apt/lists/* /var/cache/apt/*
#
# build gstreamer
RUN set -eux; \
git clone --depth 1 --branch $GSTREAMER_VERSION https://gitlab.freedesktop.org/gstreamer/gstreamer.git /gstreamer/src; \
cd /gstreamer/src; \
mkdir -p /usr/share/gstreamer; \
meson --prefix /usr/share/gstreamer \
-Dgpl=enabled \
-Dugly=enabled \
-Dgst-plugins-ugly:x264=enabled \
build; \
ninja -C build; \
meson install -C build;
#
# Stage 2: Runtime.
#
FROM nvidia/cuda:${CUDA_VERSION}-runtime-ubuntu${UBUNTU_RELEASE} AS runtime
ARG UBUNTU_RELEASE
ARG VIRTUALGL_VERSION
# Make all NVIDIA GPUs visible by default
ENV NVIDIA_VISIBLE_DEVICES=all
# All NVIDIA driver capabilities should preferably be used, check `NVIDIA_DRIVER_CAPABILITIES` inside the container if things do not work
ENV NVIDIA_DRIVER_CAPABILITIES=all
#
# set vgl-display to headless 3d gpu card/// correct values are egl[n] or /dev/dri/card0:if this is passed into container
# Set vgl-display to headless 3d gpu card/// correct values are egl[n] or /dev/dri/card0:if this is passed into container
ENV VGL_DISPLAY=egl
#
# set custom user
ARG USERNAME=neko
ARG USER_UID=1000
ARG USER_GID=$USER_UID
#
# install hardware accleration dependencies
ENV DEBIAN_FRONTEND=noninteractive
RUN set -eux; \
dpkg --add-architecture i386; \
apt-get update; \
apt-get install -y --no-install-recommends \
wget gpg ca-certificates \
# opengl base: https://gitlab.com/nvidia/container-images/opengl/-/blob/ubuntu20.04/base/Dockerfile
libxau6 libxau6:i386 \
libxdmcp6 libxdmcp6:i386 \
libxcb1 libxcb1:i386 \
libxext6 libxext6:i386 \
libx11-6 libx11-6:i386 \
libxau6 libxdmcp6 libxcb1 libxext6 libx11-6 \
# opengl runtime: https://gitlab.com/nvidia/container-images/opengl/-/blob/ubuntu20.04/glvnd/runtime/Dockerfile
libglvnd0 libglvnd0:i386 \
libgl1 libgl1:i386 \
libglx0 libglx0:i386 \
libegl1 libegl1:i386 \
libgles2 libgles2:i386 \
libglvnd0 libgl1 libglx0 libegl1 libgles2 \
# hardware accleration utilities
libglu1 libglu1:i386 \
libvulkan-dev libvulkan-dev:i386 \
mesa-utils mesa-utils-extra \
mesa-va-drivers mesa-vulkan-drivers \
vainfo vdpauinfo; \
libglu1 libvulkan-dev vainfo vdpauinfo vulkan-tools \
mesa-utils mesa-utils-extra mesa-va-drivers mesa-vulkan-drivers; \
#
# install vulkan-utils or vulkan-tools depending on ubuntu release
if [ "${UBUNTU_RELEASE}" = "18.04" ]; then \
apt-get install -y --no-install-recommends vulkan-utils; \
else \
apt-get install -y --no-install-recommends vulkan-tools; \
# install an up-to-date version of VirtualGL
if [ -n "${VIRTUALGL_VERSION}" ]; then \
#
# add VirtualGL GPG key
wget -q -O- https://packagecloud.io/dcommander/virtualgl/gpgkey | \
gpg --dearmor >/etc/apt/trusted.gpg.d/VirtualGL.gpg; \
#
# download the official VirtualGL.list file
wget -q -O /etc/apt/sources.list.d/VirtualGL.list \
https://raw.githubusercontent.com/VirtualGL/repo/main/VirtualGL.list; \
#
# install packages
apt-get update; \
apt-get install -y --no-install-recommends virtualgl=${VIRTUALGL_VERSION}; \
fi; \
#
# create symlink for libnvrtc.so (needed for cudaconvert)
find /usr/local/cuda/lib64/ -maxdepth 1 -type l -name "*libnvrtc.so.*" -exec sh -c 'ln -sf {} /usr/local/cuda/lib64/libnvrtc.so' \;; \
#
# configure EGL manually
mkdir -p /usr/share/glvnd/egl_vendor.d/; \
echo "{\n\
\"file_format_version\" : \"1.0.0\",\n\
\"ICD\": {\n\
\"library_path\": \"libEGL_nvidia.so.0\"\n\
}\n\
}" > /usr/share/glvnd/egl_vendor.d/10_nvidia.json; \
#
# configure Vulkan manually
VULKAN_API_VERSION=$(dpkg -s libvulkan1 | grep -oP 'Version: [0-9|\.]+' | grep -oP '[0-9]+(\.[0-9]+)(\.[0-9]+)'); \
mkdir -p /etc/vulkan/icd.d/; \
echo "{\n\
\"file_format_version\" : \"1.0.0\",\n\
\"ICD\": {\n\
\"library_path\": \"libGLX_nvidia.so.0\",\n\
\"api_version\" : \"${VULKAN_API_VERSION}\"\n\
}\n\
}" > /etc/vulkan/icd.d/nvidia_icd.json; \
#
# clean up
apt-get clean -y; \
rm -rf /var/lib/apt/lists/* /var/cache/apt/*
@@ -119,6 +74,16 @@ RUN set -eux; \
# add cuda to ld path, for gstreamer cuda plugins
ENV LD_LIBRARY_PATH="/usr/lib/x86_64-linux-gnu:/usr/lib/i386-linux-gnu${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}:/usr/local/cuda/lib:/usr/local/cuda/lib64"
#
# entrypoint script that sets up VirtualGL and runs commands
COPY nvidia/entrypoint.sh /bin/entrypoint.sh
#
# set custom user
ARG USERNAME=neko
ARG USER_UID=1000
ARG USER_GID=$USER_UID
#
# install dependencies
ENV DEBIAN_FRONTEND=noninteractive
@@ -127,24 +92,27 @@ RUN set -eux; \
apt-get install -y --no-install-recommends \
wget ca-certificates supervisor \
pulseaudio dbus-x11 xserver-xorg-video-dummy \
libcairo2 libxcb1 libxrandr2 libxv1 libopus0 libvpx6 libx264-155 libvo-aacenc0 librtmp1 \
libgtk-3-bin software-properties-common cabextract aptitude vim curl \
#
libcairo2 libxcb1 libxrandr2 libxv1 libopus0 libvpx9 libx264-164 libvo-aacenc0 librtmp1 libxcvt0 \
#x
# needed for profile upload preStop hook
zip curl \
#
# file chooser handler, clipboard, drop
xdotool xclip libgtk-3-0; \
xdotool xclip libgtk-3-0 \
#
# gst
gstreamer1.0-plugins-base gstreamer1.0-plugins-good \
gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly \
gstreamer1.0-pulseaudio; \
#
# install libxcvt0 (not available in debian:bullseye)
ARCH=$(dpkg --print-architecture); \
wget http://ftp.de.debian.org/debian/pool/main/libx/libxcvt/libxcvt0_0.1.2-1_${ARCH}.deb; \
apt-get install --no-install-recommends ./libxcvt0_0.1.2-1_${ARCH}.deb; \
rm ./libxcvt0_0.1.2-1_${ARCH}.deb; \
#
# create a non-root user
groupadd --gid $USER_GID $USERNAME; \
useradd --uid $USER_UID --gid $USERNAME --shell /bin/bash --create-home $USERNAME; \
# rename default user with UID $USER_GID to $USERNAME if it exists, else create $USERNAME
if id -u $USER_GID &>/dev/null; then \
usermod -l $USERNAME -d /home/$USERNAME -m $(getent passwd $USER_GID | cut -d: -f1); \
groupmod -n $USERNAME $(getent group $USER_GID | cut -d: -f1); \
else \
groupadd --gid $USER_GID $USERNAME; \
useradd --uid $USER_UID --gid $USERNAME --shell /bin/bash --create-home $USERNAME; \
fi; \
adduser $USERNAME audio; \
adduser $USERNAME video; \
adduser $USERNAME pulse; \
@@ -160,6 +128,7 @@ RUN set -eux; \
/home/$USERNAME/.config/pulse \
/home/$USERNAME/.local/share/xorg; \
chmod 1777 /var/log/neko; \
chmod 0700 /tmp/runtime-$USERNAME; \
chown $USERNAME /var/log/neko/ /tmp/runtime-$USERNAME; \
chown -R $USERNAME:$USERNAME /home/$USERNAME; \
#
@@ -183,45 +152,6 @@ RUN set -eux; \
apt-get clean -y; \
rm -rf /var/lib/apt/lists/* /var/cache/apt/*
#
# configure EGL and Vulkan manually
RUN VULKAN_API_VERSION=$(dpkg -s libvulkan1 | grep -oP 'Version: [0-9|\.]+' | grep -oP '[0-9]+(\.[0-9]+)(\.[0-9]+)') && \
# Configure EGL manually
mkdir -p /usr/share/glvnd/egl_vendor.d/ && \
echo "{\n\
\"file_format_version\" : \"1.0.0\",\n\
\"ICD\": {\n\
\"library_path\": \"libEGL_nvidia.so.0\"\n\
}\n\
}" > /usr/share/glvnd/egl_vendor.d/10_nvidia.json && \
# Configure Vulkan manually
mkdir -p /etc/vulkan/icd.d/ && \
echo "{\n\
\"file_format_version\" : \"1.0.0\",\n\
\"ICD\": {\n\
\"library_path\": \"libGLX_nvidia.so.0\",\n\
\"api_version\" : \"${VULKAN_API_VERSION}\"\n\
}\n\
}" > /etc/vulkan/icd.d/nvidia_icd.json
#
# install an up-to-date version of VirtualGL
RUN apt-get update; \
apt-get install -y --no-install-recommends wget gpg ca-certificates; \
# Add VirtualGL GPG key
wget -q -O- https://packagecloud.io/dcommander/virtualgl/gpgkey | \
gpg --dearmor >/etc/apt/trusted.gpg.d/VirtualGL.gpg; \
# Download the official VirtualGL.list file
wget -q -O /etc/apt/sources.list.d/VirtualGL.list \
https://raw.githubusercontent.com/VirtualGL/repo/main/VirtualGL.list; \
# Install packages
apt-get update; \
apt-get install -y --no-install-recommends virtualgl=${VIRTUALGL_VERSION}; \
#
# clean up
apt-get clean -y; \
rm -rf /var/lib/apt/lists/* /var/cache/apt/*
#
# copy runtime configs
COPY --chown=neko:neko .Xresources /home/$USERNAME/.Xresources
@@ -230,7 +160,6 @@ COPY default.pa /etc/pulse/default.pa
COPY supervisord.conf /etc/neko/supervisord.conf
COPY supervisord.dbus.conf /etc/neko/supervisord.dbus.conf
COPY xorg.conf /etc/neko/xorg.conf
COPY nvidia/entrypoint.sh /bin/entrypoint.sh
#
# copy runtime folders
@@ -248,16 +177,6 @@ ENV NEKO_SERVER_BIND=:8080
ENV NEKO_PLUGINS_ENABLED=true
ENV NEKO_PLUGINS_DIR=/etc/neko/plugins/
#
# set gstreamer envs
ENV PATH="/usr/share/gstreamer/bin:${PATH}"
ENV LD_LIBRARY_PATH="/usr/share/gstreamer/lib/x86_64-linux-gnu${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}"
ENV PKG_CONFIG_PATH="/usr/share/gstreamer/lib/x86_64-linux-gnu/pkgconfig${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}}"
#
# copy artifacts from previous stages
COPY --from=gstreamer /usr/share/gstreamer /usr/share/gstreamer
#
# add healthcheck
HEALTHCHECK --interval=10s --timeout=5s --retries=8 \
-184
View File
@@ -1,184 +0,0 @@
ARG UBUNTU_RELEASE=22.04
ARG CUDA_VERSION=12.2.0
ARG VIRTUALGL_VERSION=3.1.3-20250409
FROM nvidia/cuda:${CUDA_VERSION}-runtime-ubuntu${UBUNTU_RELEASE} AS runtime
ARG VIRTUALGL_VERSION
# Make all NVIDIA GPUs visible by default
ENV NVIDIA_VISIBLE_DEVICES=all
# All NVIDIA driver capabilities should preferably be used, check `NVIDIA_DRIVER_CAPABILITIES` inside the container if things do not work
ENV NVIDIA_DRIVER_CAPABILITIES=all
# Set vgl-display to headless 3d gpu card/// correct values are egl[n] or /dev/dri/card0:if this is passed into container
ENV VGL_DISPLAY=egl
#
# install hardware accleration dependencies
ENV DEBIAN_FRONTEND=noninteractive
RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends \
wget gpg ca-certificates \
# opengl base: https://gitlab.com/nvidia/container-images/opengl/-/blob/ubuntu20.04/base/Dockerfile
libxau6 libxdmcp6 libxcb1 libxext6 libx11-6 \
# opengl runtime: https://gitlab.com/nvidia/container-images/opengl/-/blob/ubuntu20.04/glvnd/runtime/Dockerfile
libglvnd0 libgl1 libglx0 libegl1 libgles2 \
# hardware accleration utilities
libglu1 libvulkan-dev vainfo vdpauinfo vulkan-tools \
mesa-utils mesa-utils-extra mesa-va-drivers mesa-vulkan-drivers; \
#
# install an up-to-date version of VirtualGL
if [ -n "${VIRTUALGL_VERSION}" ]; then \
#
# add VirtualGL GPG key
wget -q -O- https://packagecloud.io/dcommander/virtualgl/gpgkey | \
gpg --dearmor >/etc/apt/trusted.gpg.d/VirtualGL.gpg; \
#
# download the official VirtualGL.list file
wget -q -O /etc/apt/sources.list.d/VirtualGL.list \
https://raw.githubusercontent.com/VirtualGL/repo/main/VirtualGL.list; \
#
# install packages
apt-get update; \
apt-get install -y --no-install-recommends virtualgl=${VIRTUALGL_VERSION}; \
fi; \
#
# create symlink for libnvrtc.so (needed for cudaconvert)
find /usr/local/cuda/lib64/ -maxdepth 1 -type l -name "*libnvrtc.so.*" -exec sh -c 'ln -sf {} /usr/local/cuda/lib64/libnvrtc.so' \;; \
#
# configure EGL manually
mkdir -p /usr/share/glvnd/egl_vendor.d/; \
echo "{\n\
\"file_format_version\" : \"1.0.0\",\n\
\"ICD\": {\n\
\"library_path\": \"libEGL_nvidia.so.0\"\n\
}\n\
}" > /usr/share/glvnd/egl_vendor.d/10_nvidia.json; \
#
# configure Vulkan manually
VULKAN_API_VERSION=$(dpkg -s libvulkan1 | grep -oP 'Version: [0-9|\.]+' | grep -oP '[0-9]+(\.[0-9]+)(\.[0-9]+)'); \
mkdir -p /etc/vulkan/icd.d/; \
echo "{\n\
\"file_format_version\" : \"1.0.0\",\n\
\"ICD\": {\n\
\"library_path\": \"libGLX_nvidia.so.0\",\n\
\"api_version\" : \"${VULKAN_API_VERSION}\"\n\
}\n\
}" > /etc/vulkan/icd.d/nvidia_icd.json; \
#
# clean up
apt-get clean -y; \
rm -rf /var/lib/apt/lists/* /var/cache/apt/*
#
# add cuda to ld path, for gstreamer cuda plugins
ENV LD_LIBRARY_PATH="/usr/lib/x86_64-linux-gnu:/usr/lib/i386-linux-gnu${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}:/usr/local/cuda/lib:/usr/local/cuda/lib64"
#
# entrypoint script that sets up VirtualGL and runs commands
COPY nvidia/entrypoint.sh /bin/entrypoint.sh
#
# set custom user
ARG USERNAME=neko
ARG USER_UID=1000
ARG USER_GID=$USER_UID
#
# install dependencies
ENV DEBIAN_FRONTEND=noninteractive
RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends \
wget ca-certificates supervisor \
pulseaudio dbus-x11 xserver-xorg-video-dummy \
libcairo2 libxcb1 libxrandr2 libxv1 libopus0 libvpx7 libx264-163 libvo-aacenc0 librtmp1 libxcvt0 \
#
# needed for profile upload preStop hook
zip curl \
#
# file chooser handler, clipboard, drop
xdotool xclip libgtk-3-0 \
#
# gst
gstreamer1.0-plugins-base gstreamer1.0-plugins-good \
gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly \
gstreamer1.0-pulseaudio; \
#
# create a non-root user
groupadd --gid $USER_GID $USERNAME; \
useradd --uid $USER_UID --gid $USERNAME --shell /bin/bash --create-home $USERNAME; \
adduser $USERNAME audio; \
adduser $USERNAME video; \
adduser $USERNAME pulse; \
#
# workaround for an X11 problem: http://blog.tigerteufel.de/?p=476
mkdir /tmp/.X11-unix; \
chmod 1777 /tmp/.X11-unix; \
chown $USERNAME /tmp/.X11-unix/; \
#
# make directories for neko
mkdir -p /etc/neko /var/www /var/log/neko \
/tmp/runtime-$USERNAME \
/home/$USERNAME/.config/pulse \
/home/$USERNAME/.local/share/xorg; \
chmod 1777 /var/log/neko; \
chmod 0700 /tmp/runtime-$USERNAME; \
chown $USERNAME /var/log/neko/ /tmp/runtime-$USERNAME; \
chown -R $USERNAME:$USERNAME /home/$USERNAME; \
#
# install fonts
apt-get install -y --no-install-recommends \
# Emojis
fonts-noto-color-emoji \
# Chinese fonts
fonts-arphic-ukai fonts-arphic-uming \
fonts-wqy-zenhei xfonts-intl-chinese xfonts-wqy \
# Japanese fonts
fonts-ipafont-mincho fonts-ipafont-gothic \
fonts-takao-mincho \
# Korean fonts
fonts-unfonts-core \
fonts-wqy-microhei \
# Indian fonts
fonts-indic; \
#
# clean up
apt-get clean -y; \
rm -rf /var/lib/apt/lists/* /var/cache/apt/*
#
# copy runtime configs
COPY --chown=neko:neko .Xresources /home/$USERNAME/.Xresources
COPY dbus /usr/bin/dbus
COPY default.pa /etc/pulse/default.pa
COPY supervisord.conf /etc/neko/supervisord.conf
COPY supervisord.dbus.conf /etc/neko/supervisord.dbus.conf
COPY xorg.conf /etc/neko/xorg.conf
#
# copy runtime folders
COPY --chown=neko:neko icon-theme /home/$USERNAME/.icons/default
COPY fontconfig/* /etc/fonts/conf.d/
COPY fonts /usr/local/share/fonts
#
# set default envs
ENV USER=$USERNAME
ENV DISPLAY=:99.0
ENV PULSE_SERVER=unix:/tmp/pulseaudio.socket
ENV XDG_RUNTIME_DIR=/tmp/runtime-$USERNAME
ENV NEKO_SERVER_BIND=:8080
ENV NEKO_PLUGINS_ENABLED=true
ENV NEKO_PLUGINS_DIR=/etc/neko/plugins/
#
# add healthcheck
HEALTHCHECK --interval=10s --timeout=5s --retries=8 \
CMD wget -O - http://localhost:${NEKO_SERVER_BIND#*:}/health || \
wget --no-check-certificate -O - https://localhost:${NEKO_SERVER_BIND#*:}/health || \
exit 1
#
# run neko
CMD ["/usr/bin/supervisord", "-c", "/etc/neko/supervisord.conf"]
+2 -9
View File
@@ -1,4 +1,4 @@
ARG BASE_IMAGE=golang:1.24-bullseye
ARG BASE_IMAGE=golang:1.24-trixie
FROM $BASE_IMAGE AS server
WORKDIR /src
@@ -9,16 +9,9 @@ ENV DEBIAN_FRONTEND=noninteractive
RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends \
libx11-dev libxrandr-dev libxtst-dev libgtk-3-dev \
libx11-dev libxrandr-dev libxtst-dev libgtk-3-dev libxcvt-dev \
libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev; \
#
# install libxcvt-dev (not available in debian:bullseye)
ARCH=$(dpkg --print-architecture); \
wget http://ftp.de.debian.org/debian/pool/main/libx/libxcvt/libxcvt-dev_0.1.2-1_${ARCH}.deb; \
wget http://ftp.de.debian.org/debian/pool/main/libx/libxcvt/libxcvt0_0.1.2-1_${ARCH}.deb; \
apt-get install --no-install-recommends ./libxcvt0_0.1.2-1_${ARCH}.deb ./libxcvt-dev_0.1.2-1_${ARCH}.deb; \
rm ./libxcvt0_0.1.2-1_${ARCH}.deb ./libxcvt-dev_0.1.2-1_${ARCH}.deb; \
#
# clean up
apt-get clean -y; \
rm -rf /var/lib/apt/lists/* /var/cache/apt/*
-31
View File
@@ -1,31 +0,0 @@
ARG BASE_IMAGE=golang:1.24-bookworm
FROM $BASE_IMAGE AS server
WORKDIR /src
#
# install dependencies
ENV DEBIAN_FRONTEND=noninteractive
RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends \
libx11-dev libxrandr-dev libxtst-dev libgtk-3-dev libxcvt-dev \
libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev; \
#
# clean up
apt-get clean -y; \
rm -rf /var/lib/apt/lists/* /var/cache/apt/*
ARG GIT_COMMIT
ARG GIT_BRANCH
ARG GIT_TAG
#
# build server
COPY . .
RUN ./build
#
# artifacts from this stage
# COPY --from=server /src/bin/plugins/ $NEKO_PLUGINS_DIR
# COPY --from=server /src/bin/neko /usr/bin/neko
+1 -1
View File
@@ -1,4 +1,4 @@
ARG BASE_IMAGE=debian:bullseye-slim
ARG BASE_IMAGE=debian:trixie-slim
FROM $BASE_IMAGE AS xorg-deps
WORKDIR /xorg
+1 -1
View File
@@ -1,4 +1,4 @@
FROM debian:bullseye-slim
FROM debian:trixie-slim
ENV DEBIAN_FRONTEND=noninteractive
+3 -3
View File
@@ -213,16 +213,16 @@ By default, the browsers in Neko do not allow installing extensions except for t
- `ExtensionInstallAllowlist`: These extensions can be installed by the user when needed; they are not pre-installed.
- `ExtensionInstallBlocklist`: These extensions cannot be installed by the user, which is `*` (all extensions) by default.
The ID of the extension can be found in the URL of the extension in the Chrome Web Store. For example, the ID of the [uBlock Origin](https://chromewebstore.google.com/detail/ublock-origin/cjpalhdlnbpafiamejdnhcphjbkeiagm) extension is `cjpalhdlnbpafiamejdnhcphjbkeiagm`.
The ID of the extension can be found in the URL of the extension in the Chrome Web Store. For example, the ID of the [uBlock Origin Lite](https://chromewebstore.google.com/detail/ublock-origin-lite/ddkjiahejlhfcafbddmgiahcphecmpfh) extension is `ddkjiahejlhfcafbddmgiahcphecmpfh`.
```json title="policy.json"
{
"ExtensionInstallForcelist": [
"cjpalhdlnbpafiamejdnhcphjbkeiagm;https://clients2.google.com/service/update2/crx",
"ddkjiahejlhfcafbddmgiahcphecmpfh;https://clients2.google.com/service/update2/crx",
"mnjggcdmjocbbbhaepdhchncahnbgone;https://clients2.google.com/service/update2/crx"
],
"ExtensionInstallAllowlist": [
"cjpalhdlnbpafiamejdnhcphjbkeiagm",
"ddkjiahejlhfcafbddmgiahcphecmpfh",
"mnjggcdmjocbbbhaepdhchncahnbgone"
],
"ExtensionInstallBlocklist": [
+3 -4
View File
@@ -85,7 +85,9 @@ Check the [Firefox-based browsers customization guide](/docs/v3/customization/br
There are multiple flavors of Chromium-based browsers available as Neko Docker images.
They need `--cap-add=SYS_ADMIN` (see [security implications](https://www.redhat.com/en/blog/container-tidbits-adding-capabilities-container) for more information) and extended shared memory size (`--shm-size=2g`) to work properly.
Chromium is running with `--no-sandbox` flag, which is required to run it in a container without additional configuration. You can read more about it in [Quick introduction](https://www.google.com/googlebooks/chrome/med_26.html) to Chrome's sandbox. More in-depth [design document](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/design/sandbox.md), with internal links to FAQ, etc.
Additionally, chromium-based browsers require `--shm-size=2g` (or more) to work properly. This is because the default shared memory size for Docker containers is too small for Chromium-based browsers, which can lead to crashes and other issues.
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
@@ -95,7 +97,6 @@ import TabItem from '@theme/TabItem';
```bash
docker run \
--cap-add=SYS_ADMIN \
--shm-size=2g \
ghcr.io/m1k1o/neko/chromium
```
@@ -105,8 +106,6 @@ import TabItem from '@theme/TabItem';
<TabItem value="docker-compose" label="Docker Compose configuration">
```yaml title="docker-compose.yaml"
cap_add:
- SYS_ADMIN
shm_size: 2g
```
-4
View File
@@ -36,8 +36,6 @@ services:
image: "ghcr.io/m1k1o/neko/chromium:latest"
restart: "unless-stopped"
shm_size: "2gb"
cap_add:
- SYS_ADMIN
ports:
- "8080:8080"
- "52000-52100:52000-52100/udp"
@@ -60,8 +58,6 @@ services:
image: "ghcr.io/m1k1o/neko/vlc:latest"
restart: "unless-stopped"
shm_size: "2gb"
cap_add:
- SYS_ADMIN
volumes:
- "<your-video-folder>:/video" # mount your video folder
ports:
+1 -7
View File
@@ -163,16 +163,12 @@ If you put a local IP as `NEKO_WEBRTC_NAT1TO1`, external clients try to connect
### Getting a black screen with a cursor, but no browser for Chromium-based browsers {#black-screen-with-cursor}
Check if you did not forget to add `cap_add` to your `docker-compose.yaml` file. Make sure that the `shm_size` is set to `2gb` or higher.
Make sure that the `shm_size` is set to `2gb` or higher.
```yaml title="docker-compose.yaml"
services:
neko:
image: "ghcr.io/m1k1o/neko/chromium:latest"
# highlight-start
cap_add:
- SYS_ADMIN
# highlight-end
restart: "unless-stopped"
# highlight-start
shm_size: "2gb"
@@ -202,8 +198,6 @@ services:
- 1.1.1.1
- 8.8.8.8
# highlight-end
cap_add:
- SYS_ADMIN
restart: "unless-stopped"
shm_size: "2gb"
# ...
+6 -9
View File
@@ -22,12 +22,12 @@ title: Getting started
Use the following docker images from [Docker Hub](https://hub.docker.com/r/m1k1o/neko) for x86_64:
- `m1k1o/neko:latest` or `m1k1o/neko:firefox` - for Firefox.
- `m1k1o/neko:chromium` - for Chromium (needs `--cap-add=SYS_ADMIN`, see the [security implications](https://www.redhat.com/en/blog/container-tidbits-adding-capabilities-container)).
- `m1k1o/neko:google-chrome` - for Google Chrome (needs `--cap-add=SYS_ADMIN`, see the [security implications](https://www.redhat.com/en/blog/container-tidbits-adding-capabilities-container)).
- `m1k1o/neko:ungoogled-chromium` - for [Ungoogled Chromium](https://github.com/Eloston/ungoogled-chromium) (needs `--cap-add=SYS_ADMIN`, see the [security implications](https://www.redhat.com/en/blog/container-tidbits-adding-capabilities-container)) (by @whalehub).
- `m1k1o/neko:microsoft-edge` - for Microsoft Edge (needs `--cap-add=SYS_ADMIN`, see the [security implications](https://www.redhat.com/en/blog/container-tidbits-adding-capabilities-container)).
- `m1k1o/neko:brave` - for [Brave Browser](https://brave.com) (needs `--cap-add=SYS_ADMIN`, see the [security implications](https://www.redhat.com/en/blog/container-tidbits-adding-capabilities-container)).
- `m1k1o/neko:vivaldi` - for [Vivaldi Browser](https://vivaldi.com) (needs `--cap-add=SYS_ADMIN`, see the [security implications](https://www.redhat.com/en/blog/container-tidbits-adding-capabilities-container)) (by @Xeddius).
- `m1k1o/neko:chromium` - for Chromium.
- `m1k1o/neko:google-chrome` - for Google Chrome.
- `m1k1o/neko:ungoogled-chromium` - for [Ungoogled Chromium](https://github.com/Eloston/ungoogled-chromium) (by @whalehub).
- `m1k1o/neko:microsoft-edge` - for Microsoft Edge.
- `m1k1o/neko:brave` - for [Brave Browser](https://brave.com).
- `m1k1o/neko:vivaldi` - for [Vivaldi Browser](https://vivaldi.com) (by @Xeddius).
- `m1k1o/neko:opera` for [Opera Browser](https://opera.com) (requires extra steps to enable DRM, see instructions [here](https://www.reddit.com/r/operabrowser/wiki/opera/linux_widevine_config/). libffmpeg is already configured.) (by @prophetofxenu)
- `m1k1o/neko:tor-browser` - for Tor Browser.
- `m1k1o/neko:remmina` - for remote desktop connection (by @lowne).
@@ -267,7 +267,6 @@ docker run -d --gpus all \
-e NEKO_VIDEO_CODEC=h264 \
-e NEKO_HWENC=nvenc \
--shm-size=2gb \
--cap-add=SYS_ADMIN \
--name neko \
ghcr.io/m1k1o/neko/nvidia-google-chrome:latest
```
@@ -284,8 +283,6 @@ services:
ports:
- "8080:8080"
- "56000-56100:56000-56100/udp"
cap_add:
- SYS_ADMIN
environment:
NEKO_SCREEN: '1920x1080@30'
NEKO_PASSWORD: neko
@@ -38,8 +38,6 @@ services:
ports:
- "8080:8080"
- "52000-52100:52000-52100/udp"
cap_add:
- SYS_ADMIN
environment:
NEKO_SCREEN: '1920x1080@30'
NEKO_PASSWORD: neko
@@ -62,8 +60,6 @@ services:
ports:
- "8080:8080"
- "52000-52100:52000-52100/udp"
cap_add:
- SYS_ADMIN
environment:
NEKO_SCREEN: '1920x1080@30'
NEKO_PASSWORD: neko
-25
View File
@@ -34,31 +34,6 @@ Ensure, that you have enabled debug mode in javascript console too, in order to
There exists an extension [Google Input Tools](https://chrome.google.com/webstore/detail/mclkkofklkfljcocdinagocijmpgbhab) for Chrome that allows you to use Chinese input method.
## Only black screen is displayed but remote cursor is moving for Chromium-based browsers (Chrome, Edge, etc.)
Check if you did not forget to add cap_add to your docker-compose file.
```yaml title="docker-compose.yaml"
version: "3.4"
services:
neko:
image: "m1k1o/neko:chromium"
# highlight-start
cap_add:
- SYS_ADMIN
# highlight-end
restart: "unless-stopped"
shm_size: "2gb"
ports:
- "8080:8080"
- "52000-52100:52000-52100/udp"
environment:
NEKO_SCREEN: '1920x1080@30'
NEKO_PASSWORD: neko
NEKO_PASSWORD_ADMIN: admin
NEKO_EPR: 52000-52100
```
## How can I embed the Neko desktop into web page without login prompt coming up for viewers?
You can use the following URL to embed the Neko desktop into a web page without login prompt coming up for viewers:
@@ -227,8 +227,6 @@ Check if your TCP port is exposed correctly and your reverse proxy is correctly
Getting black screen with a cursor, but no browser.
```
Most likely you forgot to add `-cap-add=SYS_ADMIN` when using chromium-based browsers.
### Unrelated server errors
```