commit a407728f81a495d7191d1ae490735092885422e4
parent cdece537b58901e543014e4502fb2cfd7949e742
Author: Henry Unite <unitehenry@gmail.com>
Date: Sat, 18 Jul 2026 23:19:33 +0000
feat: xpod base image
Diffstat:
3 files changed, 26 insertions(+), 13 deletions(-)
diff --git a/Containerfile b/Containerfile
@@ -12,14 +12,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
xvfb \
x11-apps \
xauth \
- x11vnc \
- && add-apt-repository ppa:xtradeb/apps -y \
- && apt-get update \
- && apt-get install -y chromium \
- && rm -rf /var/lib/apt/lists/* \
- && apt-get clean
-
-RUN useradd -m -U -s /bin/bash chrome
+ x11vnc
COPY <<'EOF' /start.sh
#!/bin/bash
@@ -39,9 +32,7 @@ x11vnc -display $DISPLAY \
-repeat \
&
-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" chrome
+/app.sh
wait
EOF
diff --git a/apps/chromium/Containerfile b/apps/chromium/Containerfile
@@ -0,0 +1,21 @@
+FROM xpod-base
+
+RUN add-apt-repository ppa:xtradeb/apps -y \
+ && apt-get update \
+ && apt-get install -y chromium \
+ && rm -rf /var/lib/apt/lists/* \
+ && apt-get clean
+
+RUN useradd -m -U -s /bin/bash chrome
+
+COPY <<'EOF' /app.sh
+#!/bin/bash
+set -e
+
+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" chrome
+
+EOF
+
+RUN chmod +x /app.sh
diff --git a/scripts/start b/scripts/start
@@ -1,5 +1,6 @@
#!/usr/bin/env bash
set -e
-podman build -t xpod .
-podman run -it --rm -p 5900:5900 xpod
+podman build -t xpod-base .
+podman build -t xpod-chromium -f apps/chromium/Containerfile apps/chromium
+podman run -it --rm -p 5900:5900 xpod-chromium