From 7602f81000d36a344f1b6a5f1bd16904ba2064a6 Mon Sep 17 00:00:00 2001 From: Brandt Kurowski Date: Fri, 22 May 2026 11:45:19 -0400 Subject: [PATCH 1/2] Fix stale shellServer cwd breaking dotfiles install (#45) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Anchor lifecycle scripts to $WORKSPACE_FOLDER at entry and exit so the shellServer's cwd stays valid for subsequent steps — including the devcontainer CLI's own dotfiles install, which previously failed with "Unable to read current working directory" after onCreate work invalidated the inode the shellServer had cd'd into. Co-Authored-By: Claude Opus 4.7 --- local/etc/uceap.d/devcontainer_on_create.sh | 5 +++++ local/etc/uceap.d/devcontainer_post_create.sh | 5 +++++ local/etc/uceap.d/devcontainer_update_content.sh | 3 +++ 3 files changed, 13 insertions(+) diff --git a/local/etc/uceap.d/devcontainer_on_create.sh b/local/etc/uceap.d/devcontainer_on_create.sh index 4d20013..afa5f3c 100644 --- a/local/etc/uceap.d/devcontainer_on_create.sh +++ b/local/etc/uceap.d/devcontainer_on_create.sh @@ -1,4 +1,6 @@ function devcontainer_on_create() { + _cwd_workspace + # Change default umask and add user to web group so we can share write permission on web files sed -i 's/^#umask\s*022/umask 002/' ~/.profile echo "umask 002" >>~/.zshrc @@ -91,6 +93,9 @@ function devcontainer_on_create() { if [ -x .devcontainer/onCreate.sh ]; then .devcontainer/onCreate.sh fi + + # Leave the shellServer with a valid cwd for any subsequent step (see issue #45) + cd "$WORKSPACE_FOLDER" } _devcontainer_on_create_desc='runs when the devcontainer is created' diff --git a/local/etc/uceap.d/devcontainer_post_create.sh b/local/etc/uceap.d/devcontainer_post_create.sh index ab53106..9090845 100644 --- a/local/etc/uceap.d/devcontainer_post_create.sh +++ b/local/etc/uceap.d/devcontainer_post_create.sh @@ -1,4 +1,6 @@ function devcontainer_post_create() { + _cwd_workspace + # set global ServerName so that apachectl isn't chatty if [[ -n "$CODESPACE_NAME" ]]; then SERVER_NAME="$CODESPACE_NAME-8080.app.github.dev" @@ -27,6 +29,9 @@ function devcontainer_post_create() { if [ -x .devcontainer/postCreate.sh ]; then .devcontainer/postCreate.sh fi + + # Leave the shellServer with a valid cwd for any subsequent step (see issue #45) + cd "$WORKSPACE_FOLDER" } _devcontainer_post_create_desc='runs after the devcontainer is created' diff --git a/local/etc/uceap.d/devcontainer_update_content.sh b/local/etc/uceap.d/devcontainer_update_content.sh index 82c071f..01184c0 100644 --- a/local/etc/uceap.d/devcontainer_update_content.sh +++ b/local/etc/uceap.d/devcontainer_update_content.sh @@ -14,6 +14,9 @@ function devcontainer_update_content() { if [ -x .devcontainer/updateContent.sh ]; then .devcontainer/updateContent.sh fi + + # Leave the shellServer with a valid cwd for any subsequent step (see issue #45) + cd "$WORKSPACE_FOLDER" } _devcontainer_update_content_desc='runs when devcontainer content needs updating' From a948fdba6d41464802c97bc24b77d9459d4a5605 Mon Sep 17 00:00:00 2001 From: Brandt Kurowski Date: Fri, 22 May 2026 11:45:26 -0400 Subject: [PATCH 2/2] Upgrade base image from PHP 8.3 to 8.4 Co-Authored-By: Claude Opus 4.7 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 4da5577..16602d5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/devcontainers/php:8.3 +FROM mcr.microsoft.com/devcontainers/php:8.4 # Change default umask and add user to web group so we can share write permission on web files # Configure pam_umask to set umask to 002 (works regardless of /etc/login.defs content)