File size: 2,317 Bytes
15d3d04
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# 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