Replies: 1 comment 3 replies
-
Hi 👋 Thanks for a detailed description and yes, there is a way to incorporate each user's custom settings in dev containers. You can use a combination of The Here's a step-by-step plan:
If you use Codespaces, then you can achieve the same with dotfiles. Refer to https://docs.github.com/en/codespaces/setting-your-user-preferences/personalizing-github-codespaces-for-your-account#dotfiles Side note, looping in @craiglpeters who was already working on a PR to contribute a dev container to |
Beta Was this translation helpful? Give feedback.
-
Hello, I have a question regarding the use of Dev Containers for building containers. Is there a way to incorporate each user's custom settings? If so, could you please explain how?
From what I've checked from the website (https://containers.dev/), it appears that the
devcontainer.json
file does not offer any methods for adding user-specific settings and commands, for instance, usingonCreateCommand
or other extension points.In a development environment, there are necessary settings and tools that all users need, and others that are not universally required. For example, in the
kubernetes/kubernetes
project, the method of running e2e tests seems to vary among users.https://github.com/kubernetes/community/blob/master/contributors/devel/development.md#e2e-tests
kubernetes-sigs/kind#1181 (comment)
I am currently working on a PR to introduce dev containers into
kubernetes/kubernetes
, and it is a challenging issue to decide how many such tools should be installed.kubernetes/kubernetes#124584
Not limited to
kubernetes/kubernetes
, there are often cases where having tools likejq
installed personally can make development more convenient, even if they might not be significant enough to include in a repository'sdevcontainer.json
. For instance, installing such tools individually after building the Dev Container can be inconvenient because if the Dev Container is rebuilt, you must reinstall the tools.If there was a feature in Dev Containers that allowed each user to automatically add their custom settings outside of devcontainer.json during container creation, it could significantly enhance the flexibility and potentially make Dev Containers more widely adopted by developers. I am curious if there are already established best practices or solutions for this issue. If you have any experiences or knowledge to share, I would greatly appreciate your input.
Beta Was this translation helpful? Give feedback.
All reactions