I want to share my troubleshooting experience when creating a sample project for https://www.daytona.io/.
Problem Background
I need a valid devcontainer.json
to run daytona properly but I don't have experience in writing devcontainer configuration & (in that moment) https://devcontainer.ai/ can't generate one for me.
The Solution
I found the alternative way to generate it using VSCode IDE.
- Install VSCode Plugin named
Dev Containers
- Open Command Palette (default shortcut: Ctrl+shift+P)
- Search for Dev Containers:
Add Dev Container Configuration Files
then select it - Choose
Add configuration to workspace
- Choose the configuration template. In my case, because I'm building a project using Laravel, I choose PHP for the configuration template then choose the default for the PHP version.
- Choose the additional features to install. In my case, I need Node.js (via NPM) installed to support my Laravel project then keep defaults
- Choose optional File / directories. In my case, I don't need additional file / directories
- And.. Voila! A fresh
devcontainer.json
has been generated for you.
I found this method is very beginner friendly to those who don't have experience in writing devcontainer configuration because the generated config file has several informative comments in it so it can helps we learn
Top comments (1)
Good post!