| # 1. Base Image: WebTop (Ubuntu XFCE) | |
| FROM lscr.io/linuxserver/webtop:ubuntu-xfce | |
| # Switch to root to install dependencies and configure system | |
| USER root | |
| # ========================================== | |
| # π¦ ESSENTIALS ONLY | |
| # ========================================== | |
| # socat: Needed for the port bridge | |
| # curl/wget: Needed for you to download apps manually | |
| RUN apt-get update && \ | |
| apt-get install -y \ | |
| socat \ | |
| curl \ | |
| wget \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # ========================================== | |
| # β‘ NETWORK BRIDGE (Port 7860 -> 3000) | |
| # ========================================== | |
| RUN mkdir -p /etc/services.d/forwarder && \ | |
| echo '#!/usr/bin/with-contenv bash' > /etc/services.d/forwarder/run && \ | |
| echo 'exec socat TCP-LISTEN:7860,fork,reuseaddr TCP:127.0.0.1:3000' >> /etc/services.d/forwarder/run && \ | |
| chmod +x /etc/services.d/forwarder/run | |
| # ========================================== | |
| # π€ SHARED SESSION FIX | |
| # ========================================== | |
| # This allows you and your wife to be logged in at the exact same time. | |
| # We modify the default KasmVNC config to allow concurrent connections. | |
| RUN sed -i 's/allow_concurrent_connections: false/allow_concurrent_connections: true/g' /defaults/kasmvnc.yaml || \ | |
| echo "allow_concurrent_connections: true" >> /defaults/kasmvnc.yaml | |
| # ========================================== | |
| # π PERFORMANCE (480p Speed Mode) | |
| # ========================================== | |
| ENV CUSTOM_RES_W=854 | |
| ENV CUSTOM_RES_H=480 | |
| ENV KASM_SVC_FRAMERATE=24 | |
| ENV KASM_SVC_COMPRESSION_ALGO=webp | |
| ENV KASM_SVC_LOSSY_COMPRESSION=true | |
| # Disable Compositor (Saves CPU) | |
| RUN xfconf-query -c xfwm4 -p /general/use_compositing -s false || true | |
| # ========================================== | |
| # π€ CREDENTIALS & USER ID | |
| # ========================================== | |
| ENV TITLE="π" | |
| ENV CUSTOM_USER="Admin" | |
| ENV PASSWORD="121459" | |
| # β οΈ SECURITY FIX: | |
| # Changed from 0 (Root) to 1000 (Normal User). | |
| # This FIXES the issue where software would not run. | |
| ENV PUID=1000 | |
| ENV PGID=1000 | |
| ENV TZ="Asia/Tehran" | |
| EXPOSE 7860 |