1

My team are using Visual Studio Code devcontainers in a repo that we all use. devcontainers is a great way to provide a consistent development environment however there are still nuanced differences that different team members want to make when using devcontainers. In my case I would like to install some utilities (e.g. rich, jless) but I don't want to bloat the container image for everyone (in fact I raised a PR to add one of these tools to the container image Dockerfile and it got rejected). Similarly I'd like to create some aliases that I commonly use and I know I can do so by using postCreateCommand in devcontainer.json however, again, I don't want to bloat devcontainer.json with stuff that only I use.

I've read the documentation on devcontainers, specifically on devcontainer.json, and I couldn't find a way of making changes to the container that only affect the container for myself.

Does anyone know a way that I can install tools and create aliases in the container that will only be done for myself? Speaking more generally, is there a way to make changes to the devcontainer that only apply to me, not anyone else?

jamiet
  • 10,501
  • 14
  • 80
  • 159
  • No reply here so I've raised this as a feature request https://github.com/microsoft/vscode/issues/180399 – jamiet Apr 20 '23 at 08:57
  • There's a reply on that issue that suggests Personalizing with dotfiles could help: https://code.visualstudio.com/docs/devcontainers/containers#_personalizing-with-dotfile-repositories . Haven't checked it out yet but from what I read there it definitely looks promising. – jamiet May 02 '23 at 10:32
  • dotfiles definitely did the job. Check it out. – jamiet Aug 21 '23 at 11:33

0 Answers0