Skip to content

A portable Docker-based development environment with Neovim, Tmux, Conda, and GitHub Copilot CLI.

License

Notifications You must be signed in to change notification settings

matheusvir/devdocker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

15 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🐳 DevDocker

A portable Docker-based development environment with Neovim, Tmux, Conda, and GitHub Copilot CLI.


⚠️ WARNING: This is a prototype!
Use at your own risk. This project is in early development and may contain bugs or unexpected behavior.
Always backup your data before use.


Prerequisites

  • Docker & Docker Compose
  • Git
  • Active GitHub Copilot subscription (Individual, Business, or Enterprise)

Setup

1. Create structure

mkdir -p devdocker/projects
cd devdocker

2. Create files

Copy the provided files:

  • docker-compose.yml
  • Dockerfile
  • entrypoint.sh
  • setup-configs.sh

3. Build the image

docker compose build

4. Start container

docker compose up -d

Note: On first startup, a non-root user will be automatically created using your host username and UID/GID. This ensures proper file permissions between the container and host system. The user will have passwordless sudo access. This setup only runs once - subsequent starts will use the created user automatically.

5. Attach to container

docker attach devdocker

You will be automatically logged in as the non-root user created in step 4.

To detach without stopping the container: Press Ctrl+P followed by Ctrl+Q

6. Run setup script

setup-configs.sh

The script will ask for your dotfiles repository URL.

Expected dotfiles structure:

dotfiles/
β”œβ”€β”€ nvim/          # Neovim config (or lvim/)
β”œβ”€β”€ .tmux.conf     # Tmux config
└── .bashrc        # Bash config (or .bashr)

7. Authenticate GitHub Copilot CLI

Launch Copilot CLI and authenticate with your GitHub account:

copilot

When prompted, use the /login command and follow the on-screen instructions to authenticate with your GitHub credentials.

8. Install plugins (if needed)

Neovim (Packer):

nvim
:PackerSync

Tmux (TPM):

tmux
# Press: <prefix> + I

Daily Usage

Start environment

cd devdocker
docker compose up -d
docker attach devdocker

Or create an alias:

# Add to your host .bashrc or .zshrc
alias dev='cd ~/devdocker && docker compose up -d && docker attach devdocker'

Then simply run:

dev

Detach from container (keep it running)

Press: Ctrl+P then Ctrl+Q

Stop environment

docker compose stop

Remove container (keeps volumes)

docker compose down

Remove everything (including volumes)

docker compose down -v

Configuration

Change cursor style

By default, DevDocker preserves your terminal cursor as a beam bar (|). You can change this by modifying the DEVDOCKER_CURSOR environment variable in docker-compose.yml:

  • 1 or 2 - Block cursor (β–ˆ)
  • 3 or 4 - Underline cursor (_)
  • 5 or 6 - Beam bar cursor (|) [default]

Example:

environment:
  - DEVDOCKER_CURSOR=2  # Block cursor

Installed Software

  • Ubuntu: 22.04 LTS
  • Neovim: 0.11.3 (latest stable)
  • Tmux: Latest from Ubuntu repos
  • Miniconda: Latest version
  • Python: Latest from conda-forge
  • Node.js: 20.x LTS
  • GitHub Copilot CLI: Latest version

Using GitHub Copilot CLI

GitHub Copilot CLI is an AI coding agent that works directly in your terminal, similar to tools like Claude Code, Codex, and Gemini CLI. It helps you work with codebases, debug issues, write scripts, and automate development tasks without leaving the command line.

Getting Started

After authentication, simply run:

copilot

What Copilot CLI Can Do

  • Navigate codebases: Ask about project structure and understand new repositories
  • Environment setup: Verify dependencies and install missing tools
  • Find issues: Search and rank GitHub issues by difficulty
  • Code implementation: Draft code changes and review diffs before applying
  • Git workflow: Stage files, write commits, and open pull requests
  • System tasks: Kill processes, manage ports, and execute shell commands
  • File operations: Read, write, and modify files with AI assistance

Staying in Control

Copilot CLI always asks for permission before:

  • Running commands on your system
  • Accessing directories
  • Making file changes

You can:

  • Allow once or always for specific commands
  • View current permissions with /session
  • Reset permissions with /reset
  • Manage allowed directories with /add-directory

Available Commands

Type / in Copilot CLI to see all available commands, including:

  • /login - Authenticate with GitHub
  • /help - Show available commands
  • /session - View current session permissions
  • /reset - Reset all permissions
  • /mcp - Extend with MCP servers

Press Ctrl+R to see logs of commands Copilot has executed.

Commands

Check container status

docker compose ps

View logs

docker compose logs -f

Create conda environment

conda create -n myproject python=3.11
conda activate myproject

Backup

Backup important volumes

# Conda environments
docker run --rm -v devdocker_conda_envs:/data -v $(pwd):/backup ubuntu tar czf /backup/conda_envs_backup.tar.gz -C /data .

# Neovim configs
docker run --rm -v devdocker_nvim_data:/data -v $(pwd):/backup ubuntu tar czf /backup/nvim_backup.tar.gz -C /data .

Restore backup

# Conda environments
docker run --rm -v devdocker_conda_envs:/data -v $(pwd):/backup ubuntu tar xzf /backup/conda_envs_backup.tar.gz -C /data

# Neovim configs
docker run --rm -v devdocker_nvim_data:/data -v $(pwd):/backup ubuntu tar xzf /backup/nvim_backup.tar.gz -C /data

About

A portable Docker-based development environment with Neovim, Tmux, Conda, and GitHub Copilot CLI.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published