27 lines
1.6 KiB
Docker
27 lines
1.6 KiB
Docker
# AnyBot's own computer ("Bot 的電腦"): a Linux desktop the bots share, like the original's box
|
|
# (an X11 desktop driven by xdotool, watched through noVNC on port 6080).
|
|
FROM debian:bookworm-slim
|
|
ENV DEBIAN_FRONTEND=noninteractive LANG=C.UTF-8 TZ=UTC
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
xvfb x11vnc xdotool x11-utils x11-xserver-utils imagemagick fluxbox xterm \
|
|
novnc python3-websockify chromium fonts-noto-cjk fonts-noto-color-emoji \
|
|
ca-certificates curl wget git jq unzip zip less nano vim-tiny procps psmisc \
|
|
python3 python3-pip python3-venv nodejs npm sudo tini dbus-x11 xclip \
|
|
&& apt-get clean && rm -rf /var/lib/apt/lists/* \
|
|
&& useradd -m -s /bin/bash bot && echo 'bot ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/bot \
|
|
&& ln -sf /usr/share/novnc/vnc.html /usr/share/novnc/index.html
|
|
COPY start.sh /usr/local/bin/anybot-box-start
|
|
COPY fluxbox-init /etc/anybot/fluxbox-init
|
|
COPY overlay /etc/anybot/overlay
|
|
COPY Xresources /etc/anybot/Xresources
|
|
COPY menu /etc/anybot/menu
|
|
RUN chmod +x /usr/local/bin/anybot-box-start \
|
|
# Chromium has no sandbox inside a container (no user namespaces); the box itself is the
|
|
# sandbox. Debian's chromium wrapper reads these flags for every launch (menu, bots, xdg-open).
|
|
&& printf '%s\n' 'export CHROMIUM_FLAGS="$CHROMIUM_FLAGS --no-sandbox --disable-dev-shm-usage --no-first-run --no-default-browser-check --disable-gpu --password-store=basic --test-type"' > /etc/chromium.d/anybot
|
|
ENV DISPLAY=:1 SCREEN_SIZE=1280x800x24
|
|
EXPOSE 6080
|
|
LABEL anybot.box.version="3"
|
|
ENTRYPOINT ["/usr/bin/tini", "--"]
|
|
CMD ["/usr/local/bin/anybot-box-start"]
|