Skip to content

Commit cf5f740

Browse files
authored
Merge pull request #527 from nextflow-io/try_devcontainer_variable_again
Unified Devcontainer Configuration for Local and Codespaces Development
2 parents 4fa5f08 + c14bf4e commit cf5f740

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.devcontainer/devcontainer.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@
88
"features": {
99
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {}
1010
},
11-
"workspaceFolder": "/workspaces/training/",
12-
"workspaceMount": "source=${localWorkspaceFolder},target=${localWorkspaceFolder},type=bind",
11+
"workspaceFolder": "/workspaces/training",
12+
"workspaceMount": "source=${localWorkspaceFolder},target=/workspaces/training,type=bind", // Used for local devcontainers, ignored in Codespaces.
1313
"remoteEnv": {
1414
"NXF_HOME": "/workspaces/.nextflow",
15-
"HOST_PROJECT_PATH": "${localWorkspaceFolder}"
15+
"HOST_PROJECT_PATH": "/workspaces/training" //Codespaces and local devcontainers will both work with this.
1616
},
17+
"postCreateCommand": "if [ -z \"$CODESPACES\" ]; then echo \"Local Development\"; else echo \"Codespaces Development\"; fi",
1718
// Configure tool-specific properties.
1819
"customizations": {
1920
// Configure properties specific to VS Code.

0 commit comments

Comments
 (0)