From d54515244c9ee1ac18cac9149aef7ad47c83db9a Mon Sep 17 00:00:00 2001 From: Chris Farhood Date: Fri, 20 Feb 2026 07:50:25 -0500 Subject: [PATCH] fix: set app user shell to /bin/bash so VSCode terminals work baseimage-gui creates the app user (UID 1000) at runtime with shell=/sbin/nologin and home=/dev/null. VSCode tries to spawn the user's login shell for terminals, which fails with exit code 1. Adds a cont-init script that runs as root after baseimage-gui's adduser step and corrects both the shell and home directory. Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude Co-Authored-By: Happy --- Dockerfile | 4 +++- scripts/cont-init-user.sh | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 scripts/cont-init-user.sh diff --git a/Dockerfile b/Dockerfile index a04b6ab..812d492 100644 --- a/Dockerfile +++ b/Dockerfile @@ -58,9 +58,11 @@ RUN groupadd -g 1000 user && \ RUN mkdir -p /workspace && \ chown -R user:user /workspace -# Copy startup script +# Copy startup scripts COPY --chmod=755 scripts/startapp.sh /startapp.sh COPY --chmod=755 scripts/init-repo.sh /usr/local/bin/init-repo +# Fix app user shell after baseimage-gui creates it at runtime +COPY --chmod=755 scripts/cont-init-user.sh /etc/cont-init.d/20-fix-user-shell.sh # Set working directory WORKDIR /workspace diff --git a/scripts/cont-init-user.sh b/scripts/cont-init-user.sh new file mode 100644 index 0000000..3f756d0 --- /dev/null +++ b/scripts/cont-init-user.sh @@ -0,0 +1,6 @@ +#!/bin/sh +# Fix the app user (UID 1000) created by baseimage-gui at runtime. +# baseimage-gui sets shell=/sbin/nologin and home=/dev/null, which +# prevents VSCode from opening terminals. +usermod -s /bin/bash app +usermod -d /home/user app