From 56e11aac580d22fc3f2bf8be61c33a476c24cd9d Mon Sep 17 00:00:00 2001 From: NikLeberg <39563554+NikLeberg@users.noreply.github.com> Date: Fri, 19 Apr 2024 10:48:46 +0000 Subject: [PATCH] dev: fix devcontainer env for codespaces In Github Codespaces the environment inside as well as outside of the base container is identical regarding the folder structure. To provide DooD functionality while working with data local to the base container the /workspaces folder can be simply volume mounted. --- .devcontainer/.env | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.devcontainer/.env b/.devcontainer/.env index 44b9ea4..c7f0f59 100644 --- a/.devcontainer/.env +++ b/.devcontainer/.env @@ -3,6 +3,9 @@ function get_common_args () { if [ -n "$GITHUB_ACTIONS" ]; then common_vols="--volume /home/runner/work:/__w" common_misc="--workdir $(pwd) --rm" + elif [ -n "$CODESPACES" ]; then + common_vols="--volume /workspaces:/workspaces" + common_misc="--workdir $(pwd) --init --interactive --tty --rm" else common_vols="--volumes-from $(cat /proc/self/cgroup | head -n 1 | cut -d '/' -f3)" common_misc="--workdir $(pwd) --init --interactive --tty --rm"