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

Allow the user to specify inputs for .devcontainer.json #9397

Open
aidan-gallagher opened this issue Jan 17, 2024 · 1 comment
Open

Allow the user to specify inputs for .devcontainer.json #9397

aidan-gallagher opened this issue Jan 17, 2024 · 1 comment
Labels
containers Issue in vscode-remote containers

Comments

@aidan-gallagher
Copy link

aidan-gallagher commented Jan 17, 2024

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

No tasks being tracked yet.
@savvn001
Copy link

+1 would like this feature too

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

No branches or pull requests

3 participants