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) 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'