From fc1463c290baadb20feb8e0efbed058070a728f2 Mon Sep 17 00:00:00 2001 From: Finn Stutzenstein Date: Fri, 23 Oct 2026 19:23:37 +0000 Subject: [PATCH] Create /workspaces in the devcontainer for the dev user Folders next to the project, like a clone of another repository, can be created without root. Co-Authored-By: Claude Opus 5.5 --- .devcontainer/Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index ee5edb5..f8c6ca6 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -27,6 +27,10 @@ RUN groupadd --gid $USER_GID $USERNAME && \ echo "$USERNAME ALL=(root) NOPASSWD:ALL" > /etc/sudoers.d/$USERNAME && \ chmod 0440 /etc/sudoers.d/$USERNAME +# Owned by the dev user so folders can be created next to the project. Docker +# would otherwise create it as root when bind mounting /workspaces/max. +RUN mkdir /workspaces && chown $USERNAME:$USERNAME /workspaces + # Project venv, owned by the dev user so pip works without sudo ENV VIRTUAL_ENV=/opt/venv RUN python -m venv $VIRTUAL_ENV && chown -R $USERNAME:$USERNAME $VIRTUAL_ENV