A Docker-based development environment with Neovim + NvChad, tmux, and Node.js for consistent coding across machines.
- π Neovim (latest stable)
- β¨ NvChad (starter config)
- π₯οΈ tmux with plugin manager (TPM)
- π¦ Node.js 20.x with npm and yarn
- πΎ Persistent tmux sessions (tmux-resurrect)
- π§ Python 3 and build tools
- π Access to all your projects
- Docker
- Docker Compose v2 (
docker compose) - Git
If docker compose is missing on Ubuntu/WSL, install the plugin:
sudo apt-get update
sudo apt-get install -y docker-compose-plugin
docker compose version-
Clone this repository:
git clone https://github.com/yourusername/nvim-dev.git cd nvim-dev -
Set up environment variables:
This repo runs the container as your user to avoid permission issues on mounted folders. Create a
.envwith your UID/GID:printf "UID=%s\nGID=%s\n" "$(id -u)" "$(id -g)" > .env
-
Install a Nerd Font on your host (required for icons):
NvChad (and plugins like
nvim-tree) use Nerd Font glyphs for icons. Install a Nerd Font on the host OS and set it as your terminal font.NvChad recommendation:
- Prefer the family that does not end with
Mono(icons tend to look smaller with*Mono). - Example: FiraCode Nerd Font (not FiraCode Nerd Font Mono)
Windows Terminal: Settings β Profile β Appearance β Font face β choose your Nerd Font, then restart the terminal.
- Prefer the family that does not end with
-
Update the volume mount (optional): Edit
docker-compose.yamlto point to your projects directory:volumes: - ~/src/Repos:/repos # Change this to your projects path
-
Build and start the container:
docker compose up -d --build
-
Attach to the tmux session:
docker compose exec dev tmux attach
All your projects are mounted at /repos:
cd /repos/your-project
nvim .- First launch may install plugins (give it a minute).
- If
nvim-treeicons are missing, itβs almost always your host terminal font (see Troubleshooting).
- Prefix:
Ctrl+a(instead of defaultCtrl+b) - Save session:
Ctrl+athenCtrl+s - Restore session:
Ctrl+athenCtrl+r
# Stop the container
docker compose down
# Restart the container
docker compose restart
# View logs
docker compose logs -f
# Rebuild after changes
docker compose up -d --buildCreate your Neovim config and it will persist in the nvim-config volume:
docker compose exec dev nvim ~/.config/nvim/init.luaEdit .tmux.conf and rebuild:
docker compose up -d --buildAdd packages to Dockerfile and rebuild:
RUN apt-get update && apt-get install -y your-packageThe following are stored in Docker volumes and persist across container restarts:
- Neovim configuration (
~/.config/nvim) - Neovim plugins and data (
~/.local/share/nvim) - tmux sessions (
~/.tmux)
- Install a Nerd Font on the host OS.
- Configure your terminal to use it (choose the non-
Monofamily when available). - Restart the terminal and re-open Neovim.
Quick glyph test from WSL (icons should render if the host terminal font is correct):
printf "NerdFont test: \ue0b0 \ue0b1 \ue0a0 \uf115 \uf07b\n"If you encounter permission issues with files created in the container:
- Check your
.envfile has correct UID/GID - Rebuild:
docker compose up -d --build
If tmux exits immediately:
docker compose logs devCheck for permission errors and ensure /home/developer is owned by your UID:GID.
This wipes persisted volumes (Neovim config/data/state/cache):
docker compose down -v
docker compose up -d --buildMIT
PRs and issues are welcome. See CONTRIBUTING.md.
See SECURITY.md for vulnerability reporting.