Your Coder development Environment strikes a balance between consistent team configuration and personal customization. While the Environment Image standardizes system dependencies for development, Coder offers a few different mechanisms for customizing the Environment to best fit your needs.
/home/<username> volume is bound to your Environment. Its contents are persisted
between shutdowns and rebuilds. This ensures that personal configuration files
~/.zshrc, as well as source code and project files,
are not disrupted.
For cases where personal configuration of system files is needed, Environments expose the ~/personalize rebuild hook. Coder executes this script every time the Environment is rebuilt.
Consider the case where you want to use the
fish shell as your default shell,
but the Environment image doesn't include the package. The following
~/personalize scripts would install
fish and change the default shell
each time the environment is rebuilt.
echo "--Starting personalize" sudo apt-get update sudo apt-get install -y fish sudo chsh -s /usr/bin/fish $USER
The Environments page shows the log output of the
~/personalize script in
the build log.
A dotfiles repository is a Git repository that contains your personal Environment preferences in the form of static files and setup scripts.
We recommend configuring a dotfiles repo (which Coder then clones to your home directory) to ensure that your preferences are applied whenever your Environment turns on or you create a new Environment.
At startup, Coder clones this repository into
~/dotfiles. If an executable
~/dotfiles/install.sh is present, it is executed. If not, all dot-prefixed files
are symlinked into your home directory.
Read more about dotfiles repos here.
You can provide a link to your dotfiles repo that's hosted with the Git provider of your choice under User Preferences: