Skip to content

Commit

Permalink
dev: fix devcontainer env for codespaces
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
NikLeberg committed Apr 19, 2024
1 parent 12b0e6a commit 56e11aa
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .devcontainer/.env
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 56e11aa

Please sign in to comment.