Open File in vscode using postCreateCommand in devcontainer.json

Viewed 202

My devcontainer requires a configuration file from a mounted volume. If that file doesn't exist after creating the container, I want to create a new one and open it in vscode for the user to provide the content.

I used

"postCreateCommand": "test ! -f /root/.config/openstack/clouds.yaml && (mkdir -p /root/.config/openstack; code --wait /root/.config/openstack/clouds.yaml)",

but it complains about code or code-insiders is not installed.

What would be the correct way to do this?

0 Answers
Related