#5 - Add coder-xfce-vnc image variant and move user setup to runtime #6

Merged
GuillaumeHemmen merged 13 commits from 5-differentiate-coder-deployment-and-devcontainer-images into master 2026-05-30 07:23:04 +00:00

Closes #5.

Summary

  • Adds a new coder-xfce-vnc image variant on top of the existing coder variant, providing an XFCE desktop served over noVNC, with Firefox and JetBrains Toolbox preinstalled.
  • Wires the new variant into both CI workflows (docker-dev.yaml, docker-tag.yaml) so it builds and tags alongside the headless coder image (coder-xfce-vnc-<sha>, coder-xfce-vnc-latest).
  • Moves per-user runtime setup (NVM/Node, Yarn, bash prompt, global gitignore) out of the image build and into scripts/coder-init.sh, executed at workspace start so it works correctly with PVC-mounted /home/coder.
  • Adds scripts/coder-init-desktop.sh for desktop-only setup (Firefox APT repo, JetBrains Toolbox), and scripts/start-xfce-vnc.sh as a standalone, idempotent launcher (re-invocation no longer kills active sessions).
  • Ships a noVNC index.html shim that auto-redirects with autoconnect=1 and supports path-based reverse proxies — important since the Coder template uses subdomain = false.
  • Adds a system-wide jetbrains-toolbox.desktop entry so Toolbox is discoverable from the XFCE menu.

Notes

  • The latest tag is now scoped to the headless variant (coder-latest); the bare :latest tag was dropped from docker-tag.yaml to avoid ambiguity now that there are two variants.
  • Build-time NODE_VERSION / global-gitignore URL args were removed in favor of runtime configuration inside coder-init.sh.
  • The companion Coder Terraform template that selects between the two variants via a "Use with desktop" checkbox lives in untracked files (desktop_main.tf, desktop_readme.md) and is not part of this PR.

Test plan

  • Forgejo Actions builds both coder-<sha> and coder-xfce-vnc-<sha> images successfully on push.
  • Tag build produces coder-<tag>, coder-latest, coder-xfce-vnc-<tag>, coder-xfce-vnc-latest.
  • Headless workspace starts; code-server and JetBrains Gateway reachable; coder-init.sh provisions NVM/Node/Yarn into a fresh /home/coder PVC.
  • Desktop workspace starts; noVNC reachable via the Coder proxy path (no 404 from path concat); autoconnect lands directly in the XFCE session.
  • Restarting the desktop workspace does not kill the existing XFCE session mid-run (idempotency check on start-xfce-vnc.sh).
Closes #5. ## Summary - Adds a new `coder-xfce-vnc` image variant on top of the existing `coder` variant, providing an XFCE desktop served over noVNC, with Firefox and JetBrains Toolbox preinstalled. - Wires the new variant into both CI workflows (`docker-dev.yaml`, `docker-tag.yaml`) so it builds and tags alongside the headless `coder` image (`coder-xfce-vnc-<sha>`, `coder-xfce-vnc-latest`). - Moves per-user runtime setup (NVM/Node, Yarn, bash prompt, global gitignore) out of the image build and into `scripts/coder-init.sh`, executed at workspace start so it works correctly with PVC-mounted `/home/coder`. - Adds `scripts/coder-init-desktop.sh` for desktop-only setup (Firefox APT repo, JetBrains Toolbox), and `scripts/start-xfce-vnc.sh` as a standalone, idempotent launcher (re-invocation no longer kills active sessions). - Ships a noVNC `index.html` shim that auto-redirects with `autoconnect=1` and supports path-based reverse proxies — important since the Coder template uses `subdomain = false`. - Adds a system-wide `jetbrains-toolbox.desktop` entry so Toolbox is discoverable from the XFCE menu. ## Notes - The `latest` tag is now scoped to the headless variant (`coder-latest`); the bare `:latest` tag was dropped from `docker-tag.yaml` to avoid ambiguity now that there are two variants. - Build-time `NODE_VERSION` / global-gitignore URL args were removed in favor of runtime configuration inside `coder-init.sh`. - The companion Coder Terraform template that selects between the two variants via a "Use with desktop" checkbox lives in untracked files (`desktop_main.tf`, `desktop_readme.md`) and is **not** part of this PR. ## Test plan - [x] Forgejo Actions builds both `coder-<sha>` and `coder-xfce-vnc-<sha>` images successfully on push. - [x] Tag build produces `coder-<tag>`, `coder-latest`, `coder-xfce-vnc-<tag>`, `coder-xfce-vnc-latest`. - [x] Headless workspace starts; code-server and JetBrains Gateway reachable; `coder-init.sh` provisions NVM/Node/Yarn into a fresh `/home/coder` PVC. - [x] Desktop workspace starts; noVNC reachable via the Coder proxy path (no 404 from path concat); autoconnect lands directly in the XFCE session. - [x] Restarting the desktop workspace does not kill the existing XFCE session mid-run (idempotency check on `start-xfce-vnc.sh`).
Add coder-xfce-vnc variant with XFCE desktop and noVNC support
All checks were successful
/ docker-dev-ci (push) Successful in 3m14s
/ docker-dev-coder (push) Successful in 4m44s
/ docker-dev-coder-xfce-vnc (push) Successful in 6m7s
5dd90b4b1c
- Introduced a new Docker image variant `coder-xfce-vnc`, extending the `coder` variant with a lightweight XFCE desktop environment and noVNC web access.
- Updated workflows (`docker-dev.yaml`, `docker-tag.yaml`) to build and tag the `coder-xfce-vnc` variant alongside existing images.
- Expanded README.md with details about the new variant, including features, use cases, and usage examples.
- Enhanced Dockerfile with a new build stage for the `coder-xfce-vnc` variant, adding TigerVNC, XFCE, and noVNC.
Refactor coder-xfce-vnc variant: Update dependencies, optimize startup script, and improve VNC/noVNC configuration
All checks were successful
/ docker-dev-ci (push) Successful in 3m40s
/ docker-dev-coder (push) Successful in 4m10s
/ docker-dev-coder-xfce-vnc (push) Successful in 5m57s
9c1145bc20
Add coder-init.sh for per-user workspace initialization
All checks were successful
/ docker-dev-ci (push) Successful in 3m22s
/ docker-dev-coder (push) Successful in 3m56s
/ docker-dev-coder-xfce-vnc (push) Successful in 4m47s
49ed293c54
- Moved per-user runtime setup from image build to `coder-init.sh`, run at workspace start, ensuring flexibility for different PVC mount scenarios.
- Tasks now handled by `coder-init.sh`:
  - Install and configure NVM, Node.js (default: v24), and Yarn.
  - Populate `.bashrc` with NVM init lines and a custom prompt.
  - Download and configure a global gitignore template.
- Updated README and Dockerfile to reference the new initialization script.
- Removed build-time Node.js version and global-gitignore URL arguments; these are now runtime-configurable.
Source .bashrc in coder-init.sh for environment variable initialization
All checks were successful
/ docker-dev-ci (push) Successful in 3m52s
/ docker-dev-coder (push) Successful in 3m56s
/ docker-dev-coder-xfce-vnc (push) Successful in 5m2s
51832a141e
Move start-xfce-vnc script from inline Dockerfile definition to standalone file for better maintainability
All checks were successful
/ docker-dev-ci (push) Successful in 3m50s
/ docker-dev-coder (push) Successful in 4m15s
/ docker-dev-coder-xfce-vnc (push) Successful in 5m26s
911326c2ef
Add noVNC port check and default index.html for autoconnect
All checks were successful
/ docker-dev-ci (push) Successful in 3m36s
/ docker-dev-coder (push) Successful in 3m40s
/ docker-dev-coder-xfce-vnc (push) Successful in 4m55s
b8b03e44d3
- Prevent script re-invocation from terminating active XFCE sessions by checking if noVNC is already running.
- Add index.html in noVNC to enable proper redirection with autoconnect query string.
Improve noVNC index.html to support path-based reverse proxies
All checks were successful
/ docker-dev-ci (push) Successful in 3m11s
/ docker-dev-coder (push) Successful in 3m40s
/ docker-dev-coder-xfce-vnc (push) Successful in 4m47s
8349a1a81a
Add coder-init-desktop.sh and update Dockerfile for XFCE enhancements
Some checks failed
/ docker-dev-ci (push) Successful in 3m6s
/ docker-dev-coder (push) Successful in 3m34s
/ docker-dev-coder-xfce-vnc (push) Failing after 7m10s
bf847bddd2
- Introduced `coder-init-desktop.sh` for desktop-specific user initialization, ensuring compatibility with XFCE and noVNC.
- Added Firefox installation from Mozilla's APT repo, resolving issues with unsupported Snap packages in container environments.
- Integrated VS Code desktop app installation via Microsoft's APT repo.
- Added JetBrains Toolbox installation for per-user IDE management.
- Updated Dockerfile to include and copy the new initialization script.
Remove VS Code desktop installation from Dockerfile
All checks were successful
/ docker-dev-ci (push) Successful in 3m10s
/ docker-dev-coder (push) Successful in 4m4s
/ docker-dev-coder-xfce-vnc (push) Successful in 6m11s
157e80b3a8
Add system-wide JetBrains Toolbox desktop entry with GPU workaround
All checks were successful
/ docker-dev-ci (push) Successful in 3m6s
/ docker-dev-coder (push) Successful in 3m29s
/ docker-dev-coder-xfce-vnc (push) Successful in 6m22s
14c57801d9
- Added a `.desktop` entry for JetBrains Toolbox to Dockerfile and set up system-wide availability for XFCE environments.
- Included the `--disable-gpu` flag to address Chromium GPU initialization failure.
Fix JetBrains Toolbox desktop entry path in Exec attribute
Some checks are pending
/ docker-dev-coder-xfce-vnc (push) Has started running
/ docker-dev-ci (push) Successful in 3m5s
/ docker-dev-coder (push) Successful in 3m44s
b7e11c5ed8
Remove --disable-gpu flag from JetBrains Toolbox desktop entry
All checks were successful
/ docker-dev-coder (push) Successful in 4m8s
/ docker-dev-ci (push) Successful in 4m18s
/ docker-dev-coder-xfce-vnc (push) Successful in 6m36s
ecfb1a7ada
Remove --disable-gpu flag from JetBrains Toolbox desktop entry
All checks were successful
/ docker-dev-coder (push) Successful in 4m8s
/ docker-dev-ci (push) Successful in 4m11s
/ docker-dev-coder-xfce-vnc (push) Successful in 6m51s
86b85387b0
GuillaumeHemmen deleted branch 5-differentiate-coder-deployment-and-devcontainer-images 2026-05-30 07:23:04 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
actions/sindri!6
No description provided.