pc / Dockerfile
moustuofa's picture
Create Dockerfile
15d3d04 verified
# 1. Base Image: WebTop (The Uncrashable Foundation)
FROM lscr.io/linuxserver/webtop:ubuntu-xfce
USER root
# ==========================================
# πŸ› οΈ INSTALL THE TOOLS
# ==========================================
# Installs Cloudflare, Chromium, and Network Tools
RUN apt-get update && \
apt-get install -y wget ca-certificates socat xz-utils chrome-browser && \
wget -q https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb && \
dpkg -i cloudflared-linux-amd64.deb && \
rm cloudflared-linux-amd64.deb && \
rm -rf /var/lib/apt/lists/*
# ==========================================
# ⚑ DUAL NETWORK ARCHITECTURE
# ==========================================
# 1. Setup HF Health Check (Port 7860)
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
# 2. Setup Cloudflare Tunnel (The Secret Tunnel)
# This tunnels the internal KasmVNC (Port 3000) directly to the world.
RUN echo '#!/usr/bin/with-contenv bash' > /etc/services.d/tunnel/run && \
echo 'sleep 10' >> /etc/services.d/tunnel/run && \
echo 'echo "πŸ”₯ STARTING TUNNEL..."' >> /etc/services.d/tunnel/run && \
echo 'exec cloudflared tunnel --url http://127.0.0.1:3000 --no-autoupdate' >> /etc/services.d/tunnel/run && \
chmod +x /etc/services.d/tunnel/run && \
mkdir -p /etc/services.d/tunnel
# ==========================================
# 🀝 ENABLE DUAL CONTROL
# ==========================================
ENV KASM_SVC_CONCURRENT_CONNECTIONS_PROMPT=true
# ==========================================
# πŸš€ 600KBPS SMOOTH TUNING
# ==========================================
ENV CUSTOM_RES_W=960
ENV CUSTOM_RES_H=540
ENV KASM_SVC_FRAMERATE=16
ENV KASM_SVC_VIDEO_CRF=32
ENV KASM_SVC_AUDIO_BITRATE=16000
# Kill all animations for raw speed
RUN xfconf-query -c xfwm4 -p /general/use_compositing -s false || true
# ==========================================
# 🎨 BRANDING
# ==========================================
ENV TITLE="PC"
ENV CUSTOM_USER="Admin"
ENV PASSWORD="121459"
ENV PUID=1000
ENV PGID=1000
ENV TZ="Asia/Tehran"
EXPOSE 7860