Skip to content

mpbrigham/claude-code-dev

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Claude Code Development Environment

A Docker-based development environment for using Claude Code CLI.

Overview

This repository contains Docker configuration for creating a development environment with Claude Code CLI pre-installed and ready to use.

Features

  • Ubuntu-based environment with Node.js 20.x
  • Claude Code CLI pre-installed globally
  • GitHub CLI (gh) for GitHub integration
  • SSH server configured for remote access
  • Common development tools: git, vim, nano, etc.
  • Persistent volume for your code repositories

Usage

Starting the Environment

For detached mode (background):

docker compose up -d

For interactive mode with a shell:

docker compose up

Accessing the Environment

The container provides two ways to access it:

  1. Interactive shell when starting the container directly:
docker compose run --rm claude-code
  1. SSH access from your host machine or remotely:
ssh -p 2222 ubuntu@localhost

Custom Commands

You can also override the default behavior to run specific commands:

docker compose run claude-code custom-command

Running Claude Code

Once connected to the container, you can use Claude Code with simple commands:

# Start interactive session
claude

# Ask a question about your code
claude "explain this project"

# Fix code issues
claude "fix the type errors in auth.js"

# Review and commit changes
claude commit

# Process a file
cat file.js | claude "refactor this code"

Configuration

Environment Variables

You can configure the environment by:

  1. Copying .env.example to .env and modifying it:
cp .env.example .env
  1. Editing the .env file with your preferred settings:
ANTHROPIC_API_KEY=your_api_key_here

Volume Mounts

The Docker environment supports several volume mounts:

  • Code Repositories: Maps to /home/ubuntu/repos for persistent storage of your code
  • SSH Keys: Optionally mount your local SSH keys for GitHub access
  • Claude Configuration: Optionally mount your Claude/Anthropic configuration

Edit docker-compose.yaml to customize these mounts for your environment.

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published