Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev container builds on Mac and Linux but not on Windows #10097

Closed
DennisReddyhoff opened this issue Jul 26, 2024 · 2 comments
Closed

Dev container builds on Mac and Linux but not on Windows #10097

DennisReddyhoff opened this issue Jul 26, 2024 · 2 comments
Assignees
Labels
containers Issue in vscode-remote containers info-needed Issue requires more information from poster

Comments

@DennisReddyhoff
Copy link

DennisReddyhoff commented Jul 26, 2024

Dev container builds on Mac and Linux but not on Windows

Hi, I'm getting the following "The syntax of the command is incorrect." error when trying to open a dev container on Windows:

[2024-07-26T09:53:41.209Z] Running '.zsh_history' from initializeCommand...

[2024-07-26T09:53:41.209Z] Start: Run: C:\windows\system32\cmd.exe /c touch /.zsh_history
[2024-07-26T09:53:41.730Z] Stop (525 ms): Run: C:\windows\system32\cmd.exe /c mkdir -p /.aws
[2024-07-26T09:53:41.732Z] The syntax of the command is incorrect.
[2024-07-26T09:53:41.734Z] Error: Command failed: C:\windows\system32\cmd.exe /c mkdir -p /.aws
[2024-07-26T09:53:41.734Z]     at JH (c:\Users\dreddyho\.vscode\extensions\ms-vscode-remote.remote-containers-0.375.1\dist\spec-node\devContainersSpecCLI.js:482:15)
[2024-07-26T09:53:41.734Z]     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[2024-07-26T09:53:41.734Z]     at async KtA (c:\Users\dreddyho\.vscode\extensions\ms-vscode-remote.remote-containers-0.375.1\dist\spec-node\devContainersSpecCLI.js:482:3633)
[2024-07-26T09:53:41.734Z]     at async eB (c:\Users\dreddyho\.vscode\extensions\ms-vscode-remote.remote-containers-0.375.1\dist\spec-node\devContainersSpecCLI.js:482:4886)
[2024-07-26T09:53:41.734Z]     at async hrA (c:\Users\dreddyho\.vscode\extensions\ms-vscode-remote.remote-containers-0.375.1\dist\spec-node\devContainersSpecCLI.js:663:200)
[2024-07-26T09:53:41.734Z]     at async lrA (c:\Users\dreddyho\.vscode\extensions\ms-vscode-remote.remote-containers-0.375.1\dist\spec-node\devContainersSpecCLI.js:662:13452)
[2024-07-26T09:53:41.752Z] Stop (1211 ms): Run: C:\Users\dreddyho\AppData\Local\Programs\Microsoft VS Code\Code.exe c:\Users\dreddyho\.vscode\extensions\ms-vscode-remote.remote-containers-0.375.1\dist\spec-node\devContainersSpecCLI.js up --user-data-folder c:\Users\dreddyho\AppData\Roaming\Code\User\globalStorage\ms-vscode-remote.remote-containers\data --container-session-data-folder /tmp/devcontainers-9999fdfc-1799-4d1f-8bb2-e34fed1d682a1721987619318 --workspace-folder c:\Users\dreddyho\OneDrive - Certara\Documents\Projects\abs\software --workspace-mount-consistency cached --id-label devcontainer.local_folder=c:\Users\dreddyho\OneDrive - Certara\Documents\Projects\abs\software --id-label devcontainer.config_file=c:\Users\dreddyho\OneDrive - Certara\Documents\Projects\abs\software\.devcontainer\devcontainer.json --log-level debug --log-format json --config c:\Users\dreddyho\OneDrive - Certara\Documents\Projects\abs\software\.devcontainer\devcontainer.json --default-user-env-probe loginInteractiveShell --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root --include-configuration --include-merged-configuration
[2024-07-26T09:53:41.752Z] Exit code 1
[2024-07-26T09:53:41.755Z] Command failed: C:\Users\dreddyho\AppData\Local\Programs\Microsoft VS Code\Code.exe c:\Users\dreddyho\.vscode\extensions\ms-vscode-remote.remote-containers-0.375.1\dist\spec-node\devContainersSpecCLI.js up --user-data-folder c:\Users\dreddyho\AppData\Roaming\Code\User\globalStorage\ms-vscode-remote.remote-containers\data --container-session-data-folder /tmp/devcontainers-9999fdfc-1799-4d1f-8bb2-e34fed1d682a1721987619318 --workspace-folder c:\Users\dreddyho\OneDrive - Certara\Documents\Projects\abs\software --workspace-mount-consistency cached --id-label devcontainer.local_folder=c:\Users\dreddyho\OneDrive - Certara\Documents\Projects\abs\software --id-label devcontainer.config_file=c:\Users\dreddyho\OneDrive - Certara\Documents\Projects\abs\software\.devcontainer\devcontainer.json --log-level debug --log-format json --config c:\Users\dreddyho\OneDrive - Certara\Documents\Projects\abs\software\.devcontainer\devcontainer.json --default-user-env-probe loginInteractiveShell --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root --include-configuration --include-merged-configuration
[2024-07-26T09:53:41.755Z] Exit code 1

Logs from running "Reopen as Container":

Logs
[2024-07-26T09:53:40.029Z] Dev Containers 0.375.1 in VS Code 1.91.1 (f1e16e1e6214d7c44d078b1f0607b2388f29d729).
[2024-07-26T09:53:40.029Z] Start: Resolving Remote
[2024-07-26T09:53:40.045Z] Setting up container for folder or workspace: c:\Users\dreddyho\OneDrive - Certara\Documents\Projects\abs\software
[2024-07-26T09:53:40.045Z] Context: desktop-linux
[2024-07-26T09:53:40.046Z] Start: Run: wsl -l -v
[2024-07-26T09:53:40.067Z] Could not connect to WSL.
[2024-07-26T09:53:40.068Z] spawn EPERM
[2024-07-26T09:53:40.069Z] Start: Check Docker is running
[2024-07-26T09:53:40.070Z] Start: Run: docker version
[2024-07-26T09:53:40.143Z] Client:
 Version:           27.0.3
 API version:       1.46
 Go version:        go1.21.11
 Git commit:        7d4bcd8
 Built:             Sat Jun 29 00:03:32 2024
 OS/Arch:           windows/amd64
 Context:           desktop-linux

[2024-07-26T09:53:40.144Z] Server: Docker Desktop 4.32.0 (157355)
 Engine:
  Version:          27.0.3
  API version:      1.46 (minimum version 1.24)
  Go version:       go1.21.11
  Git commit:       662f78c
  Built:            Sat Jun 29 00:02:50 2024
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.7.18
  GitCommit:        ae71819c4f5e67bb4d5ae76a6b735f29cc25774e
 runc:
  Version:          1.7.18
  GitCommit:        v1.1.13-0-g58aa920
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0
[2024-07-26T09:53:40.154Z] Stop (84 ms): Run: docker version
[2024-07-26T09:53:40.155Z] Stop (86 ms): Check Docker is running
[2024-07-26T09:53:40.155Z] Start: Run: docker volume ls -q
[2024-07-26T09:53:40.237Z] Stop (82 ms): Run: docker volume ls -q
[2024-07-26T09:53:40.238Z] Start: Run: docker ps -q -a --filter label=vsch.local.folder=c:\Users\dreddyho\OneDrive - Certara\Documents\Projects\abs\software --filter label=vsch.quality=stable
[2024-07-26T09:53:40.308Z] Stop (70 ms): Run: docker ps -q -a --filter label=vsch.local.folder=c:\Users\dreddyho\OneDrive - Certara\Documents\Projects\abs\software --filter label=vsch.quality=stable
[2024-07-26T09:53:40.309Z] Start: Run: docker ps -q -a --filter label=devcontainer.local_folder=c:\Users\dreddyho\OneDrive - Certara\Documents\Projects\abs\software --filter label=devcontainer.config_file=c:\Users\dreddyho\OneDrive - Certara\Documents\Projects\abs\software\.devcontainer\devcontainer.json
[2024-07-26T09:53:40.386Z] Stop (77 ms): Run: docker ps -q -a --filter label=devcontainer.local_folder=c:\Users\dreddyho\OneDrive - Certara\Documents\Projects\abs\software --filter label=devcontainer.config_file=c:\Users\dreddyho\OneDrive - Certara\Documents\Projects\abs\software\.devcontainer\devcontainer.json
[2024-07-26T09:53:40.387Z] Start: Run: docker ps -q -a --filter label=devcontainer.local_folder=c:\Users\dreddyho\OneDrive - Certara\Documents\Projects\abs\software
[2024-07-26T09:53:40.460Z] Stop (73 ms): Run: docker ps -q -a --filter label=devcontainer.local_folder=c:\Users\dreddyho\OneDrive - Certara\Documents\Projects\abs\software
[2024-07-26T09:53:40.460Z] Start: Run: docker ps -q -a --filter label=devcontainer.local_folder=c:\Users\dreddyho\OneDrive - Certara\Documents\Projects\abs\software
[2024-07-26T09:53:40.532Z] Stop (72 ms): Run: docker ps -q -a --filter label=devcontainer.local_folder=c:\Users\dreddyho\OneDrive - Certara\Documents\Projects\abs\software
[2024-07-26T09:53:40.533Z] Running Dev Containers CLI:   up --user-data-folder c:\Users\dreddyho\AppData\Roaming\Code\User\globalStorage\ms-vscode-remote.remote-containers\data --container-session-data-folder /tmp/devcontainers-9999fdfc-1799-4d1f-8bb2-e34fed1d682a1721987619318 --workspace-folder c:\Users\dreddyho\OneDrive - Certara\Documents\Projects\abs\software --workspace-mount-consistency cached --id-label devcontainer.local_folder=c:\Users\dreddyho\OneDrive - Certara\Documents\Projects\abs\software --id-label devcontainer.config_file=c:\Users\dreddyho\OneDrive - Certara\Documents\Projects\abs\software\.devcontainer\devcontainer.json --log-level debug --log-format json --config c:\Users\dreddyho\OneDrive - Certara\Documents\Projects\abs\software\.devcontainer\devcontainer.json --default-user-env-probe loginInteractiveShell --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root --include-configuration --include-merged-configuration
[2024-07-26T09:53:40.538Z] ProxyResolver#loadSystemCertificates count
[2024-07-26T09:53:40.540Z] ProxyResolver#loadSystemCertificates count filtered
[2024-07-26T09:53:40.541Z] Start: Run: C:\Users\dreddyho\AppData\Local\Programs\Microsoft VS Code\Code.exe c:\Users\dreddyho\.vscode\extensions\ms-vscode-remote.remote-containers-0.375.1\dist\spec-node\devContainersSpecCLI.js up --user-data-folder c:\Users\dreddyho\AppData\Roaming\Code\User\globalStorage\ms-vscode-remote.remote-containers\data --container-session-data-folder /tmp/devcontainers-9999fdfc-1799-4d1f-8bb2-e34fed1d682a1721987619318 --workspace-folder c:\Users\dreddyho\OneDrive - Certara\Documents\Projects\abs\software --workspace-mount-consistency cached --id-label devcontainer.local_folder=c:\Users\dreddyho\OneDrive - Certara\Documents\Projects\abs\software --id-label devcontainer.config_file=c:\Users\dreddyho\OneDrive - Certara\Documents\Projects\abs\software\.devcontainer\devcontainer.json --log-level debug --log-format json --config c:\Users\dreddyho\OneDrive - Certara\Documents\Projects\abs\software\.devcontainer\devcontainer.json --default-user-env-probe loginInteractiveShell --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root --include-configuration --include-merged-configuration
[2024-07-26T09:53:40.784Z] @devcontainers/cli 0.66.0. Node.js v20.9.0. win32 10.0.19045 x64.
[2024-07-26T09:53:40.784Z] Start: Run: docker buildx version
[2024-07-26T09:53:40.966Z] Stop (182 ms): Run: docker buildx version
[2024-07-26T09:53:40.967Z] github.com/docker/buildx v0.15.1-desktop.1 5a84cb97872a2e717a86a0dec58b20fd3f0bea46
[2024-07-26T09:53:40.967Z] 
[2024-07-26T09:53:40.967Z] Start: Run: docker -v
[2024-07-26T09:53:41.034Z] Stop (67 ms): Run: docker -v
[2024-07-26T09:53:41.034Z] Start: Resolving Remote
[2024-07-26T09:53:41.038Z] Start: Run: git rev-parse --show-cdup
[2024-07-26T09:53:41.101Z] Stop (63 ms): Run: git rev-parse --show-cdup
[2024-07-26T09:53:41.104Z] Loading 35 extra certificates from C:\Users\dreddyho\AppData\Local\Temp\vsch\certificates-5e87b746f9f2ec338f217be3335291b49f0514137d518f569b713eff45d858e9.pem.
[2024-07-26T09:53:41.205Z] Running '.aws' from initializeCommand...

[2024-07-26T09:53:41.205Z] Start: Run: C:\windows\system32\cmd.exe /c mkdir -p /.aws
[2024-07-26T09:53:41.207Z] Running '.ssh' from initializeCommand...

[2024-07-26T09:53:41.207Z] Start: Run: C:\windows\system32\cmd.exe /c mkdir -p /.ssh
[2024-07-26T09:53:41.207Z] Running '.jupyterhub' from initializeCommand...

[2024-07-26T09:53:41.207Z] Start: Run: C:\windows\system32\cmd.exe /c mkdir -p /.jupyterhub
[2024-07-26T09:53:41.208Z] Running '.devcontainer' from initializeCommand...

[2024-07-26T09:53:41.208Z] Start: Run: C:\windows\system32\cmd.exe /c mkdir -p /.devcontainer/software-dev
[2024-07-26T09:53:41.209Z] Running '.zsh_history' from initializeCommand...

[2024-07-26T09:53:41.209Z] Start: Run: C:\windows\system32\cmd.exe /c touch /.zsh_history
[2024-07-26T09:53:41.730Z] Stop (525 ms): Run: C:\windows\system32\cmd.exe /c mkdir -p /.aws
[2024-07-26T09:53:41.732Z] The syntax of the command is incorrect.
[2024-07-26T09:53:41.734Z] Error: Command failed: C:\windows\system32\cmd.exe /c mkdir -p /.aws
[2024-07-26T09:53:41.734Z]     at JH (c:\Users\dreddyho\.vscode\extensions\ms-vscode-remote.remote-containers-0.375.1\dist\spec-node\devContainersSpecCLI.js:482:15)
[2024-07-26T09:53:41.734Z]     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[2024-07-26T09:53:41.734Z]     at async KtA (c:\Users\dreddyho\.vscode\extensions\ms-vscode-remote.remote-containers-0.375.1\dist\spec-node\devContainersSpecCLI.js:482:3633)
[2024-07-26T09:53:41.734Z]     at async eB (c:\Users\dreddyho\.vscode\extensions\ms-vscode-remote.remote-containers-0.375.1\dist\spec-node\devContainersSpecCLI.js:482:4886)
[2024-07-26T09:53:41.734Z]     at async hrA (c:\Users\dreddyho\.vscode\extensions\ms-vscode-remote.remote-containers-0.375.1\dist\spec-node\devContainersSpecCLI.js:663:200)
[2024-07-26T09:53:41.734Z]     at async lrA (c:\Users\dreddyho\.vscode\extensions\ms-vscode-remote.remote-containers-0.375.1\dist\spec-node\devContainersSpecCLI.js:662:13452)
[2024-07-26T09:53:41.752Z] Stop (1211 ms): Run: C:\Users\dreddyho\AppData\Local\Programs\Microsoft VS Code\Code.exe c:\Users\dreddyho\.vscode\extensions\ms-vscode-remote.remote-containers-0.375.1\dist\spec-node\devContainersSpecCLI.js up --user-data-folder c:\Users\dreddyho\AppData\Roaming\Code\User\globalStorage\ms-vscode-remote.remote-containers\data --container-session-data-folder /tmp/devcontainers-9999fdfc-1799-4d1f-8bb2-e34fed1d682a1721987619318 --workspace-folder c:\Users\dreddyho\OneDrive - Certara\Documents\Projects\abs\software --workspace-mount-consistency cached --id-label devcontainer.local_folder=c:\Users\dreddyho\OneDrive - Certara\Documents\Projects\abs\software --id-label devcontainer.config_file=c:\Users\dreddyho\OneDrive - Certara\Documents\Projects\abs\software\.devcontainer\devcontainer.json --log-level debug --log-format json --config c:\Users\dreddyho\OneDrive - Certara\Documents\Projects\abs\software\.devcontainer\devcontainer.json --default-user-env-probe loginInteractiveShell --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root --include-configuration --include-merged-configuration
[2024-07-26T09:53:41.752Z] Exit code 1
[2024-07-26T09:53:41.755Z] Command failed: C:\Users\dreddyho\AppData\Local\Programs\Microsoft VS Code\Code.exe c:\Users\dreddyho\.vscode\extensions\ms-vscode-remote.remote-containers-0.375.1\dist\spec-node\devContainersSpecCLI.js up --user-data-folder c:\Users\dreddyho\AppData\Roaming\Code\User\globalStorage\ms-vscode-remote.remote-containers\data --container-session-data-folder /tmp/devcontainers-9999fdfc-1799-4d1f-8bb2-e34fed1d682a1721987619318 --workspace-folder c:\Users\dreddyho\OneDrive - Certara\Documents\Projects\abs\software --workspace-mount-consistency cached --id-label devcontainer.local_folder=c:\Users\dreddyho\OneDrive - Certara\Documents\Projects\abs\software --id-label devcontainer.config_file=c:\Users\dreddyho\OneDrive - Certara\Documents\Projects\abs\software\.devcontainer\devcontainer.json --log-level debug --log-format json --config c:\Users\dreddyho\OneDrive - Certara\Documents\Projects\abs\software\.devcontainer\devcontainer.json --default-user-env-probe loginInteractiveShell --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root --include-configuration --include-merged-configuration
[2024-07-26T09:53:41.755Z] Exit code 1
devcontainer.json
{
    "name": "software-dev",
    "build": {
        "dockerfile": "Dockerfile",
        "options": [
            "--progress=plain"
        ]
    },
    "containerEnv": {
        "ABM_ENVIRONMENT": "local",
        "DISABLE_AUTH": "1",
    },
    "customizations": {
        "vscode": {
            "extensions": [
                "anweber.statusbar-commands",
                "angular.ng-template",
                "charliermarsh.ruff",
                "circleci.circleci",
                "dangmai.workspace-default-settings",
                "dbaeumer.vscode-eslint",
                "donjayamanne.githistory",
                "eamodio.gitlens",
                "esbenp.prettier-vscode",
                "github.copilot",
                "github.copilot-chat",
                "github.vscode-pull-request-github",
                "hashicorp.hcl",
                "hashicorp.terraform",
                "hbenl.vscode-test-explorer",
                "james-yu.latex-workshop",
                "langium.langium-vscode",
                "lucono.karma-test-explorer",
                "ms-azuretools.vscode-docker",
                "ms-python.vscode-pylance",
                "ms-toolsai.jupyter",
                "ms-toolsai.vscode-jupyter-powertoys",
                "ms-vsliveshare.vsliveshare",
                "ms-vscode.cpptools-extension-pack",
                "ms-vscode.js-debug",
                "ms-vscode-remote.remote-ssh",
                "ms-vscode-remote.remote-ssh-edit",
                "ms-vscode.remote-explorer",
                "ms-vscode.remote-server",
                "ms-vscode.test-adapter-converter",
                "redhat.vscode-yaml",
                "spmeesseman.vscode-taskexplorer",
                "stkb.rewrap",
                "tamasfe.even-better-toml",
                "vadimcn.vscode-lldb",
                "xaver.clang-format"
            ],
            "settings": {
                "[c]": {
                    "editor.defaultFormatter": "xaver.clang-format"
                },
                "[cpp]": {
                    "editor.defaultFormatter": "xaver.clang-format"
                },
                "[css]": {
                    "editor.defaultFormatter": "esbenp.prettier-vscode"
                },
                "[html]": {
                    "editor.defaultFormatter": "esbenp.prettier-vscode"
                },
                "[javascript]": {
                    "editor.defaultFormatter": "esbenp.prettier-vscode"
                },
                "[json]": {
                    "editor.defaultFormatter": "esbenp.prettier-vscode"
                },
                "[jsonc]": {
                    "editor.defaultFormatter": "esbenp.prettier-vscode"
                },
                "[markdown]": {
                    "editor.defaultFormatter": "esbenp.prettier-vscode"
                },
                "[python]": {
                    "editor.codeActionsOnSave": {
                        "source.organizeImports": "always"
                    },
                    "editor.defaultFormatter": "charliermarsh.ruff"
                },
                "[scss]": {
                    "editor.defaultFormatter": "esbenp.prettier-vscode"
                },
                "[typescript]": {
                    "editor.defaultFormatter": "esbenp.prettier-vscode"
                },
                "[yaml]": {
                    "editor.defaultFormatter": "esbenp.prettier-vscode"
                },
                "circleci.notifications.areActive": "no",
                "clang-format.executable": "/opt/devcontainer/.pixi/envs/default/bin/clang-format",
                "cmake.cmakePath": "/workspaces/software/services/abm/.pixi/envs/dev/bin/cmake",
                "editor.formatOnSave": true,
                "editor.minimap.enabled": false,
                "eslint.workingDirectories": [
                    "frontends"
                ],
                "evenBetterToml.formatter.alignComments": false,
                "explorer.confirmDelete": false,
                "explorer.confirmDragAndDrop": false,
                "files.exclude": {
                    "**/__pycache__": true,
                    "**/.coverage": true,
                    "**/.pytest_cache": true,
                    "**/.ruff_cache": true,
                    "**/.angular": true
                },
                "jupyter.askForKernelRestart": false,
                "karmaTestExplorer.browser": "ElectronNoSandbox",
                "karmaTestExplorer.enableExtension": true,
                "karmaTestExplorer.envExclude": [
                    "ELECTRON_RUN_AS_NODE" // https://github.com/lucono/karma-test-explorer/issues/52
                ],
                "karmaTestExplorer.karmaConfFilePath": "spa/karma.conf.js",
                "karmaTestExplorer.projectWorkspaces": [
                    "frontends"
                ],
                "karmaTestExplorer.reloadOnKarmaConfigChange": true,
                "notebook.formatOnSave.enabled": true,
                "notebook.output.wordWrap": true,
                "prettier.prettierPath": "/opt/devcontainer/.pixi/envs/default/lib/node_modules/prettier/index.cjs",
                "python.analysis.extraPaths": [
                    "${workspaceFolder}/libraries/QSPY/src"
                ],
                "python.defaultInterpreterPath": "/workspaces/software/services/abm/.pixi/envs/dev/bin/python",
                "python.poetryPath": "/opt/devcontainer/.pixi/envs/default/bin/poetry",
                "python.terminal.activateEnvInCurrentTerminal": false,
                "python.terminal.activateEnvironment": false,
                "redhat.telemetry.enabled": false,
                "ruff.path": [
                    "/opt/devcontainer/.pixi/envs/default/bin/ruff"
                ],
                "statusbar_command.commands": [
                    {
                        "text": "$(debug) Debug ",
                        "tooltip": "Debug",
                        "alignment": "left",
                        "command": "workbench.action.debug.start",
                        "priority": -1001
                    },
                    {
                        "text": "$(run) Run ",
                        "tooltip": "Run without debugging",
                        "alignment": "left",
                        "command": "workbench.action.debug.run",
                        "priority": -1000
                    }
                ],
                "task.allowAutomaticTasks": "off",
                "task.autoDetect": "off",
                "task.problemMatchers.neverPrompt": true,
                "taskExplorer.enabledTasks": {
                    "ant": false,
                    "appPublisher": false,
                    "bash": false,
                    "composer": false,
                    "gradle": false,
                    "grunt": false,
                    "gulp": false,
                    "make": false,
                    "maven": false,
                    "npm": false,
                    "nsis": false,
                    "perl": false,
                    "pipenv": false,
                    "powershell": false,
                    "python": false,
                    "ruby": false,
                    "tsc": false,
                    "workspace": true
                },
                "taskExplorer.enableExplorerView": true,
                "taskExplorer.enableSideBar": true,
                "taskExplorer.groupWithSeparator": true,
                "taskExplorer.groupStripTaskLabel": true,
                "taskExplorer.groupSeparator": " - ",
                "taskExplorer.showExecuteWithArgumentsButton": true,
                "taskExplorer.showLastTasks": false,
                "terminal.integrated.enableVisualBell": true,
                "terminal.integrated.scrollback": 10000,
                "yaml.format.enable": false
            }
        }
    },
    "features": {
        "./clang": {},
        "./misc": {},
        "./pixi": {},
        "ghcr.io/devcontainers/features/docker-in-docker:2": {
            "moby": false,
            "dockerDashComposeVersion": "v2",
            "azureDnsAutoDetection": false
        },
        "ghcr.io/devcontainers/features/common-utils:2": {
            "installZsh": true,
            "configureZshAsDefaultShell": true,
            "installOhMyZsh": true,
            "upgradePackages": true,
            "username": "none"
        },
        "ghcr.io/devcontainers/features/desktop-lite:1": {}
    },
    "forwardPorts": [
        4200,
        5901,
        6080,
        8000,
        8001,
        11211,
        27017
    ],
    // Create bind mount directories before container is created
    "initializeCommand": {
        ".aws": "mkdir -p ${env:HOME}/.aws",
        ".ssh": "mkdir -p ${env:HOME}/.ssh",
        ".jupyterhub": "mkdir -p ${env:HOME}/.jupyterhub",
        ".devcontainer": "mkdir -p ${env:HOME}/.devcontainer/software-dev",
        ".zsh_history": "touch ${env:HOME}/.zsh_history"
    },
    "mounts": [
        "source=${env:HOME}/.aws,target=/root/.aws,type=bind",
        "source=${env:HOME}/.ssh,target=/root/.ssh,type=bind",
        "source=${env:HOME}/.jupyterhub,target=/root/.jupyterhub,type=bind",
        "source=${env:HOME}/.zsh_history,target=/root/.zsh_history,type=bind",
        // Place for users to share data with the host OS
        "source=${env:HOME}/.devcontainer/software-dev,target=/root/abm,type=bind",
        // Docker volumes for better filesystem performance on MacOS
        "source=devcontainer-node-modules,target=${containerWorkspaceFolder}/frontends/node_modules,type=volume",
        "source=devcontainer-abm-pixi,target=${containerWorkspaceFolder}/services/abm/.pixi,type=volume"
    ],
    "onCreateCommand": "./.devcontainer/on-create.sh",
    "portsAttributes": {
        "80": {
            "label": "Nginx"
        },
        "4200": {
            "label": "Angular"
        },
        "5901": {
            "label": "VNC"
        },
        "6080": {
            "label": "noVNC"
        },
        "8000": {
            "label": "Web server"
        },
        "8001": {
            "label": "Scheduler"
        },
        "11211": {
            "label": "Memcached"
        },
        "27017": {
            "label": "MongoDB"
        }
    },
    "runArgs": [
        "--name",
        "software-dev",
        "--hostname",
        "software-dev",
        "--publish",
        "80:80"
    ]
}

The container builds fine on both Linux and Mac, but I can't get it to work on my Windows machine at all.

I have tried running from VSCode in Windows and from Ubuntu installed on WSL but get the same error, is there something that needs to be changed when installing on Windows systems?

@vs-code-engineering vs-code-engineering bot added the containers Issue in vscode-remote containers label Jul 26, 2024
@chrmarti
Copy link
Contributor

The touch command referred to in your devcontainer.json does not exist on your Windows box. Similarly ${env:HOME} might be empty on Windows.

For the home folder you could try using ${localEnv:HOME}${localEnv:USERPROFILE} because one of the two is usually empty and the other one set (depending on the OS).

@chrmarti chrmarti added the info-needed Issue requires more information from poster label Jul 26, 2024
@DennisReddyhoff
Copy link
Author

DennisReddyhoff commented Jul 26, 2024

Thank you, in the end this was fixed by checking the 'Dev > Containers: Execute in WSL' option and rerunning to get around having to reformat the json file. We also ran in to issues of Git changing Unix line breaks for Windows ones. We now run the container in WSL and it builds.

@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Sep 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
containers Issue in vscode-remote containers info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

2 participants