docs/devcontainer/customization.md
This guide covers personal customizations you can make to your MongoDB devcontainer without modifying the repository's devcontainer configuration. These are user-level settings that only affect your development environment.
Want to modify the devcontainer setup for everyone? See Contributing Customizations at the bottom.
For general VS Code settings (themes, fonts, keybindings), see the VS Code documentation.
VS Code supports automatically cloning and applying your dotfiles when creating a devcontainer.
Learn more about personalizing with dotfiles →
How it works:
github.com/yourusername/dotfiles).bashrc, .gitconfig, .vimrc, etc.)// In your user settings.json
{
"dotfiles.repository": "yourusername/dotfiles",
"dotfiles.targetPath": "~/dotfiles",
"dotfiles.installCommand": "install.sh"
}
Example dotfiles structure:
dotfiles/
├── .bashrc
├── .gitconfig
├── .vimrc
├── .bash_aliases
└── install.sh
Example install.sh:
#!/bin/bash
ln -sf ~/dotfiles/.bashrc ~/.bashrc
ln -sf ~/dotfiles/.gitconfig ~/.gitconfig
ln -sf ~/dotfiles/.vimrc ~/.vimrc
source ~/.bashrc
You can configure VS Code to always install certain features in all your devcontainers.
Learn more about always-installed features →
// In your user settings.json
{
"dev.containers.defaultFeatures": {
"ghcr.io/devcontainers/features/git:1": {},
"ghcr.io/devcontainers/features/github-cli:1": {}
}
}
This applies to all devcontainers you work with, not just MongoDB.
Browse available features: https://containers.dev/features
The customizations above are all user-level and don't require changes to the repository. If you want to modify the devcontainer setup itself to benefit all MongoDB developers, you'll need to submit a PR.
Examples of repository-level customizations:
How to contribute:
.devcontainer/devcontainer.json or related filesRelated documentation:
See Also: