Replies: 3 comments 3 replies
-
Thanks for sharing this @gilesknap! I'd recommend sharing this in our dev container community Slack channel as well, as there's a broad set of folks from the dev container community who may have thoughts on this: https://aka.ms/dev-container-community. |
Beta Was this translation helpful? Give feedback.
-
Hey @gilesknap see https://code.visualstudio.com/docs/devcontainers/containers#_personalizing-with-dotfile-repositories to use dotfiles with your devcontainers |
Beta Was this translation helpful? Give feedback.
-
It looks like the dotfile repo user setting covers most of what I need. However, it is exclusively for configuration. What solutions are there for when we want to save state back to the host?
|
Beta Was this translation helpful? Give feedback.
-
I work in an organization where we have many repos each of which will have a devcontainer.
I would like our developers to be able to customize their personal experience inside these devcontainers without affecting the repository itself. In addition I would like the same customization they choose to be available to them inside all of the repos.
Essentially I'd like all of our devcontainers to provide hooks that allow individuals to add host mounts, installs and startup scripts etc. For example some of our developers like zsh and want to have access to ohmyzsh files inside the devcontainer. Another requirement is to have an eternal history file that works inside/outside devcontainers.
Is this something that others are interested in? Does anyone have a solution to this?
Approaches I have attempted:
/hosthome
and execute/hosthome/.devcontainer-rc/install.sh
which can soft link / copy / apt-get install as required$/HOME/.devcontainer-rc/custom_feature/
and indevcontainer.json
useinitializeCommand
to rsync it into thedevcontainer
folder as a first step. This feature can mount whatever parts of your home directory etc that you like and do anything else in install.shThe first option is not great because it always mounts your whole home directory.
The second is a little convoluted and requires some mitigation for those that don't have a
.devcontainer-rc
folder (fetching an empty feature definition)I'd be interested in any ideas on how to improve upon these.
Beta Was this translation helpful? Give feedback.
All reactions