From 0b660eb106816eb9411d528262571a05dc7a9683 Mon Sep 17 00:00:00 2001 From: tiennm99 Date: Mon, 5 Oct 2026 10:26:55 +0700 Subject: [PATCH] feat(webtop): add dev toolchain mods and Docker access --- webtop/README.md | 23 +++++++++++++++++++++++ webtop/compose.yml | 4 ++++ 2 files changed, 27 insertions(+) diff --git a/webtop/README.md b/webtop/README.md index 2bf348a..11c24b0 100644 --- a/webtop/README.md +++ b/webtop/README.md @@ -3,6 +3,15 @@ [Webtop](https://docs.linuxserver.io/images/docker-webtop): a full Ubuntu XFCE desktop in the browser, from the LinuxServer image, streamed by Selkies. +Comes with Go, Node.js 24, Python 3 and zsh via LinuxServer mods, the +`code-server-npmglobal` mod so `npm install -g` lands under `/config` and +persists, plus `bubblewrap`, `gh`, `git`, `glab`, `unzip` and `zip` through +`INSTALL_PACKAGES`. The `code-server-*` mods carry that name upstream but are +plain Ubuntu installers that work on any LinuxServer Ubuntu image. + +Mods install into each new container, so the first start after a recreate +takes a few minutes longer before the desktop answers. + ## Setup 1. Set `PASSWORD`. @@ -26,6 +35,20 @@ shell and `sudo`, to anyone who opens the domain. `PUID`/`PGID` are pinned to `1000` in `compose.yml`; the `Dockerfile` depends on that (see Storage). +## Docker access + +The `universal-docker` mod installs the Docker CLI but no daemon, so the host +socket is bind-mounted at `/var/run/docker.sock`. Containers started from +inside are siblings on the host, not children: bind mounts in them resolve +against host paths, so a path under `/config` will not exist unless the same +path exists on the host. + +The socket belongs to the host's `docker` group, which `abc` is not in; run +`docker` under `sudo` (the password is `PASSWORD`). Handing a container the +socket is equivalent to giving it root on the host, accepted here because this +is a single-user desktop. The `:ro` flag only marks the socket file read-only; +it does not restrict the Docker API. + ## Storage | Volume | Mount | Holds | diff --git a/webtop/compose.yml b/webtop/compose.yml index 6e54f96..07a4d9c 100644 --- a/webtop/compose.yml +++ b/webtop/compose.yml @@ -8,11 +8,15 @@ services: - PASSWORD=${PASSWORD:?required} - PUID=1000 - PGID=1000 + - 'DOCKER_MODS=linuxserver/mods:universal-package-install|linuxserver/mods:universal-docker|linuxserver/mods:code-server-golang|linuxserver/mods:code-server-nodejs|linuxserver/mods:code-server-npmglobal|linuxserver/mods:code-server-python3|linuxserver/mods:code-server-zsh' + - INSTALL_PACKAGES=bubblewrap|gh|git|glab|unzip|zip + - NODEJS_MOD_VERSION=24 - TZ=${TZ:-Asia/Ho_Chi_Minh} # - TITLE=${TITLE:-Webtop} volumes: - webtop-config:/config - webtop-workspace:/workspace + - /var/run/docker.sock:/var/run/docker.sock:ro volumes: webtop-config: