Closed ultrasimulation closed 9 months ago
Hi 👋
Thank you so much for pointing out the gap in our documentation and I apologize for the inconvenience.
For adding Templates hosted by this repository (as well as the community templates) refer to the Codespaces documentation in https://docs.github.com/en/codespaces/setting-up-your-project-for-codespaces/adding-a-dev-container-configuration/introduction-to-dev-containers#using-a-predefined-dev-container-configuration.
I will keep this issue open for tracking documentation changes.
Hello @samruddhikhandale thank you for pointing to that docs. But i still need answers to that questions so I don't know what to write in the docs 😊.
The main question is "How devcontainer templates must be used both in GH Codespaces that locally". Given this: https://github.com/devcontainers/templates/tree/main/src/dotnet-mssql, should I:
1) Clone the entire folder in my repo or reference it somehow in '.devcontainer/devcontainer.json' like I do with images and features by pulling it from the package registry associated to this repo? Otherwise what is the sense of have it packaged here: https://github.com/devcontainers/templates/pkgs/container/templates%2Fdotnet-mssql ? 3) How to pass parameters like 'templateOption:imageVariant'?
I am not able to find it as template for GH Codespaces. https://github.com/codespaces/templates
Tank you. Hope my request is clear
@ultrasimulation I have opened https://github.com/devcontainers/templates/pull/241 which should answer your questions. (Option 2 is what you are looking for, it uses the devcontainers/cli
)
Let me know if you have any feedback, thanks!
It's exactly what I was looking for. Thank you!
I searched troughout the documentation on: https://containers.dev/features https://github.com/devcontainers/features
And I can't find detailed instructions on how to use a template. Specifically I would like to use on of it with GitHub Codespaces.
I see that every template in this repository is published as a Package in the 'devcontainer' organization.
Given a template (i.e. https://github.com/devcontainers/templates/tree/main/src/dotnet-mssql). How do I use it?
1) Do I need to create a copy of the files of the entire folder in my repository? 2) Since it is published as a package, can I reference it in my '.devcontainer/devcontainer.json' like images and features? 3) How to pass a parameter for options like 'imageVariant'?
I think that in order to incentivize usage this must be documented.
Thank you