From 3fc72fe941778e10cc84ce1bab3647fec0bfd4f4 Mon Sep 17 00:00:00 2001 From: Iulian Meghea Date: Thu, 26 Feb 2026 08:04:32 +0000 Subject: [PATCH] fix: seed starship config via /etc/skel for home volume workspaces The workspace Coder template mounts a persistent volume over /home/coder, which shadows any files written to the home directory during the image build. The init script seeds the home directory with cp -rT /etc/skel ~, so starship config must live in /etc/skel to survive the volume mount. - Move starship.toml COPY target from /home/coder/.config/ to /etc/skel/.config/ - Move starship init line from /home/coder/.bashrc to /etc/skel/.bashrc - Remove USER coder switch (no longer writing to home at build time) --- images/base/Dockerfile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/images/base/Dockerfile b/images/base/Dockerfile index 46c29bb..5cd3610 100644 --- a/images/base/Dockerfile +++ b/images/base/Dockerfile @@ -72,8 +72,9 @@ RUN userdel -r ubuntu && \ --user-group && \ echo "coder ALL=(ALL) NOPASSWD:ALL" >>/etc/sudoers.d/nopasswd -USER coder - # Starship prompt configuration -COPY --chown=coder:coder starship.toml /home/coder/.config/starship.toml -RUN echo 'eval "$(starship init bash)"' >> /home/coder/.bashrc +# Place config in /etc/skel so it is copied into the home volume by the +# workspace init script (cp -rT /etc/skel ~) on every workspace start. +RUN mkdir -p /etc/skel/.config +COPY starship.toml /etc/skel/.config/starship.toml +RUN echo 'eval "$(starship init bash)"' >> /etc/skel/.bashrc