xpod

A minimal container build of X11 with VNC support.
git clone https://unitehenry.com/git/xpod.git
Log | Files | Refs | README

commit 021a5a23048ab6c92d650a30e48f1fc49a402e24
parent b6b7dea14be9442cfe9bd3738bfe1eead7d70f89
Author: Henry Unite <unitehenry@gmail.com>
Date:   Sat, 25 Jul 2026 04:21:10 +0000

refactor: mount script files

Diffstat:
MContainerfile | 29+----------------------------
Mapps/chromium/Containerfile | 18+-----------------
Aapps/chromium/app.sh | 13+++++++++++++
Astart.sh | 25+++++++++++++++++++++++++
4 files changed, 40 insertions(+), 45 deletions(-)

diff --git a/Containerfile b/Containerfile @@ -14,34 +14,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ xauth \ x11vnc -RUN cat > /start.sh <<'EOF' -#!/bin/bash -set -e - -Xvfb $DISPLAY -screen 0 $RESOLUTION -ac -nolisten tcp -extension RANDR +extension GLX & - -sleep 2 - -x11vnc -display $DISPLAY \ - -forever \ - -shared \ - -rfbport $VNC_PORT \ - -passwd $VNC_PASSWORD \ - -xkb \ - -noxdamage \ - -repeat \ - & - -if [ ! -f /app.sh ]; then - echo "/app.sh was not mounted to image" - exit 1 -fi - -/app.sh - -wait -EOF - +COPY start.sh /start.sh RUN chmod +x /start.sh EXPOSE 5900 diff --git a/apps/chromium/Containerfile b/apps/chromium/Containerfile @@ -9,23 +9,7 @@ RUN add-apt-repository ppa:xtradeb/apps -y \ RUN useradd -m -U -s /bin/bash chrome -RUN cat > /app.sh <<'EOF' -#!/bin/bash -set -e - -socat TCP-LISTEN:9222,bind=0.0.0.0,reuseaddr,fork TCP6:[::1]:9222 & - -mkdir -p /var/lib/chromium -chmod -R 777 /var/lib/chromium -rm -rf /var/lib/chromium/profile/Singleton* - -CHROMIUM_WIDTH=${RESOLUTION%%x*} -CHROMIUM_HEIGHT=${RESOLUTION#*x}; CHROMIUM_HEIGHT=${CHROMIUM_HEIGHT%%x*} - -su -c "chromium --disable-gpu --start-maximized --window-size=${CHROMIUM_WIDTH},${CHROMIUM_HEIGHT} --force-device-scale-factor=1 --remote-debugging-port=9222 --user-data-dir=/var/lib/chromium/profile" chrome - -EOF - +COPY app.sh /app.sh RUN chmod +x /app.sh EXPOSE 9222 diff --git a/apps/chromium/app.sh b/apps/chromium/app.sh @@ -0,0 +1,13 @@ +#!/bin/bash +set -e + +socat TCP-LISTEN:9222,bind=0.0.0.0,reuseaddr,fork TCP6:[::1]:9222 & + +mkdir -p /var/lib/chromium +chmod -R 777 /var/lib/chromium +rm -rf /var/lib/chromium/profile/Singleton* + +CHROMIUM_WIDTH=${RESOLUTION%%x*} +CHROMIUM_HEIGHT=${RESOLUTION#*x}; CHROMIUM_HEIGHT=${CHROMIUM_HEIGHT%%x*} + +su -c "chromium --disable-gpu --start-maximized --window-size=${CHROMIUM_WIDTH},${CHROMIUM_HEIGHT} --force-device-scale-factor=1 --remote-debugging-port=9222 --user-data-dir=/var/lib/chromium/profile" chrome diff --git a/start.sh b/start.sh @@ -0,0 +1,25 @@ +#!/bin/bash +set -e + +Xvfb $DISPLAY -screen 0 $RESOLUTION -ac -nolisten tcp -extension RANDR +extension GLX & + +sleep 2 + +x11vnc -display $DISPLAY \ + -forever \ + -shared \ + -rfbport $VNC_PORT \ + -passwd $VNC_PASSWORD \ + -xkb \ + -noxdamage \ + -repeat \ + & + +if [ ! -f /app.sh ]; then + echo "/app.sh was not mounted to image" + exit 1 +fi + +/app.sh + +wait