Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FROM ubuntu:22.04
- ENV DEBIAN_FRONTEND=noninteractive
- # 1) Base setup: locales, sudo, etc.
- RUN apt-get update && apt-get install -y \
- sudo wget gnupg curl ca-certificates locales \
- && locale-gen en_US.UTF-8
- ENV LANG en_US.UTF-8
- ENV LANGUAGE en_US:en
- ENV LC_ALL en_US.UTF-8
- # 2) Create default user
- RUN useradd -m kasm-user \
- && echo "kasm-user:kasm" | chpasswd \
- && adduser kasm-user sudo
- # 3) Create XFCE session‑cache (optional, for remembering sessions)
- RUN mkdir -p /home/kasm-user/.cache/sessions \
- && chown -R kasm-user:kasm-user /home/kasm-user/.cache
- # 4) Create autostart directory and add Pan autostart entry
- RUN mkdir -p /home/kasm-user/.config/autostart \
- && cat > /home/kasm-user/.config/autostart/pan.desktop <<EOF
- [Desktop Entry]
- Type=Application
- Exec=pan
- Hidden=false
- NoDisplay=false
- X-GNOME-Autostart-enabled=true
- Name=Pan Usenet Client
- Comment=Start Pan at login
- EOF
- RUN chown -R kasm-user:kasm-user /home/kasm-user/.config
- # 5) Install XFCE, VNC, Pan, and KasmVNC fork
- RUN apt-get update && apt-get install -y \
- xfce4 xfce4-terminal \
- pan \
- firefox \
- x11vnc \
- websockify \
- supervisor \
- git \
- && rm -rf /var/lib/apt/lists/*
- # 6) Clone and install KasmVNC (lightweight browser VNC)
- RUN git clone https://github.com/kasmtech/KasmVNC.git /opt/KasmVNC \
- && cd /opt/KasmVNC \
- && ./install.sh --skip-download
- # 7) Supervisor config will launch X, VNC, Websockify
- COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
- USER kasm-user
- WORKDIR /home/kasm-user
- CMD ["/usr/bin/supervisord"]
Advertisement
Add Comment
Please, Sign In to add comment