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

No image information specified in devcontainer.json #193

Open
trganda opened this issue Nov 30, 2023 · 1 comment
Open

No image information specified in devcontainer.json #193

trganda opened this issue Nov 30, 2023 · 1 comment

Comments

@trganda
Copy link
Contributor

trganda commented Nov 30, 2023

Maybe we should explicitly add "image" field in devcontainer.json, otherwise this error will happen when using Reopen in Container.

[448 ms] Dev Containers 0.321.0 in VS Code 1.84.2 (1a5daa3a0231a0fbba4f14db7ec463cf99d7768e).
[448 ms] Start: Run: git rev-parse --abbrev-ref --symbolic-full-name @{u}
[462 ms] Start: Run: git remote get-url origin
[494 ms] Start: Run: git remote show origin
[1608 ms] Start: Run: git rev-parse --show-cdup
[1620 ms] Start: Run: git rev-parse --abbrev-ref --symbolic-full-name @{u}
[1631 ms] Start: Run: git cat-file -e origin/main:.devcontainer/devcontainer.json
[1642 ms] Start: Run: /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) --ms-enable-electron-run-as-node /Users/trganda/.vscode/extensions/ms-vscode-remote.remote-containers-0.321.0/dist/spec-node/devContainersSpecCLI.js read-configuration --workspace-folder /Users/trganda/Projects/main/vscode-codeql-starter --log-level debug --log-format json --config /Users/trganda/Projects/main/vscode-codeql-starter/.devcontainer/devcontainer.json --mount-workspace-git-root
[1774 ms] @devcontainers/cli 0.52.1. Node.js v18.15.0. darwin 23.1.0 arm64.
[1774 ms] Start: Run: git rev-parse --show-cdup
[1787 ms] Start: Run: docker ps -q -a --filter label=devcontainer.local_folder=/Users/trganda/Projects/main/vscode-codeql-starter --filter label=devcontainer.config_file=/Users/trganda/Projects/main/vscode-codeql-starter/.devcontainer/devcontainer.json
[1805 ms] Start: Run: docker ps -q -a --filter label=devcontainer.local_folder=/Users/trganda/Projects/main/vscode-codeql-starter
[3078 ms] Start: Run: docker version --format {{.Server.APIVersion}}
[3104 ms] 1.43
[3263 ms] Start: Run: /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) --ms-enable-electron-run-as-node /Users/trganda/.vscode/extensions/ms-vscode-remote.remote-containers-0.321.0/dist/spec-node/devContainersSpecCLI.js read-configuration --workspace-folder /Users/trganda/Projects/main/vscode-codeql-starter --log-level debug --log-format json --config /Users/trganda/Projects/main/vscode-codeql-starter/.devcontainer/devcontainer.json --include-merged-configuration --mount-workspace-git-root
[3386 ms] @devcontainers/cli 0.52.1. Node.js v18.15.0. darwin 23.1.0 arm64.
[3386 ms] Start: Run: git rev-parse --show-cdup
[3398 ms] Start: Run: docker ps -q -a --filter label=devcontainer.local_folder=/Users/trganda/Projects/main/vscode-codeql-starter --filter label=devcontainer.config_file=/Users/trganda/Projects/main/vscode-codeql-starter/.devcontainer/devcontainer.json
[3412 ms] Start: Run: docker ps -q -a --filter label=devcontainer.local_folder=/Users/trganda/Projects/main/vscode-codeql-starter
[3428 ms] Error: No image information specified in devcontainer.json.
    at hK (/Users/trganda/.vscode/extensions/ms-vscode-remote.remote-containers-0.321.0/dist/spec-node/devContainersSpecCLI.js:390:24621)
    at ctA (/Users/trganda/.vscode/extensions/ms-vscode-remote.remote-containers-0.321.0/dist/spec-node/devContainersSpecCLI.js:613:35174)
[3430 ms] Exit code 1
[3430 ms] Command failed: /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) --ms-enable-electron-run-as-node /Users/trganda/.vscode/extensions/ms-vscode-remote.remote-containers-0.321.0/dist/spec-node/devContainersSpecCLI.js read-configuration --workspace-folder /Users/trganda/Projects/main/vscode-codeql-starter --log-level debug --log-format json --config /Users/trganda/Projects/main/vscode-codeql-starter/.devcontainer/devcontainer.json --include-merged-configuration --mount-workspace-git-root

Solution

{
  "name": "vscode-codeql-starter",
  "image": "mcr.microsoft.com/devcontainers/base:jammy",
  "extensions": [
    "github.vscode-codeql",
    "slevesque.vscode-zipexplorer"
  ],
  "postCreateCommand": "git submodule init && git submodule update --recursive",
  "settings": {
    "codeQL.runningQueries.memory": 2048
  }
 }
@jketema
Copy link

jketema commented Nov 30, 2023

Thanks for raising this issue and opening a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants