microsoft / microsoft/vscode-remote-release
Allow the user to specify inputs for .devcontainer.json
Open
@chrmarti is already working on this.
Since Dec 13, 2024.
containers
feature-request
- Dominant language
- Dockerfile
- Stars
- 4.2k
- Forks
- 470
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
It would be nice to allow ${inputs:XXXX} format in .devcontainer.json similar to how it works in launch.json.
Here is an example in .devcontainer.json which doesn't currently work but would be nice to have
{
"name": "Code Build Environment",
"dockerFile": "/usr/share/dpkg-buildenv/Dockerfile",
"build": {
"args": {
"DISTRIBUTION" : "${inputs:distribution}"
}
},
"inputs": [
{
"id": "distribution",
"type":"promptString",
"description": "which base os to use",
"default": "debian:12"
}
],
}
Here is an example that does work in launch.json
{
"configurations": [
{
"name": "Attach to running <my_program>",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceRoot}/build/src/<my_program>",
"miDebuggerServerAddress": "${input:remote_ip_address}:2345",
"cwd": "${workspaceRoot}",
}
],
"inputs": [
{
"id": "remote_ip_address",
"type":"promptString",
"description": "Management IP address of remote machine to debug.",
"default": "<management_ip_address>",
},
]
}
### Tasks
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.