Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 56 additions & 1 deletion .devcontainer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,68 @@ This DevContainer image is automatically built and versioned using semantic-rele
- **Minor versions**: New features and enhancements (1.0.0 → 1.1.0)
- **Major versions**: Breaking changes (1.0.0 → 2.0.0)

**Latest Version**: `v1.45.3`

Images are published to GitHub Container Registry: `ghcr.io/keito4/config-base`

### Embedded Setup Script

The image includes `/usr/local/bin/setup-claude.sh` which automatically:

- Copies Claude Code configuration from the image to `~/.claude/`
- Installs project-specific plugins from `.claude/plugins/plugins.txt`
- Applies hookify patches for Git hooks integration

**Note**: This script is only necessary when mounting host's `~/.claude` directory. For DevContainer-only usage, the image works standalone without any setup.

## Customization

### For Other Projects

To use this DevContainer configuration in other projects:
#### Option 1: DevContainer-Only (Recommended)

Use the pre-built image without mounting host's `~/.claude` directory:

```json
{
"name": "My Project",
"image": "ghcr.io/keito4/config-base:1.45.3",
"remoteEnv": {
"TMPDIR": "/home/vscode/.claude/tmp"
}
}
```

**Benefits**:

- Image configuration works immediately without setup
- No conflicts with host configuration
- Consistent environment across all team members

See [docs/devcontainer.json.example](../docs/devcontainer.json.example) for complete example.

#### Option 2: With Host Persistence

Mount host's `~/.claude` to persist custom plugin installations:

```json
{
"name": "My Project",
"image": "ghcr.io/keito4/config-base:1.45.3",
"remoteEnv": {
"TMPDIR": "/home/vscode/.claude/tmp"
},
"initializeCommand": "mkdir -p ~/.claude",
"mounts": ["source=${localEnv:HOME}/.claude,target=/home/vscode/.claude,type=bind"],
"postCreateCommand": "/usr/local/bin/setup-claude.sh"
}
```

**Note**: This overwrites image configuration with host settings. Use only when you need to persist custom plugins.
Comment on lines +97 to +136

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Three customization options provide good flexibility.

The documentation clearly presents the trade-offs between each option. The "DevContainer-Only" recommendation aligns with the PR objectives about avoiding host ~/.claude mount issues.

Minor inconsistency: The mount configuration on line 131 differs from docs/using-config-base-image.md line 90, which includes consistency=cached. Consider aligning these for consistency.

Suggested fix
-  "mounts": ["source=${localEnv:HOME}/.claude,target=/home/vscode/.claude,type=bind"],
+  "mounts": ["source=${localEnv:HOME}/.claude,target=/home/vscode/.claude,type=bind,consistency=cached"],
🤖 Prompt for AI Agents
In @.devcontainer/README.md around lines 97 - 136, The mount example under
"Option 2: With Host Persistence" omits the consistency option and should match
docs/using-config-base-image.md; update the "mounts" entry (the JSON key
"mounts" that currently uses
source=${localEnv:HOME}/.claude,target=/home/vscode/.claude,type=bind) to
include consistency=cached so it reads the same style as the referenced doc and
keep the rest of the snippet (initializeCommand and postCreateCommand)
unchanged.


#### Option 3: Custom Setup

To fully customize:

1. **Copy the entire `.devcontainer` directory** to your project root
2. **Modify `devcontainer.json`** to add project-specific requirements
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,15 @@ The repository includes a complete DevContainer setup (`.devcontainer/`) that pr
- Integrated Claude Code configuration with specialized agents and commands
- Bell notification system for development workflow events

**Latest Version**: `ghcr.io/keito4/config-base:1.45.3`

**Pre-installed Plugins** (v1.45.3):

- Official plugins: `commit-commands`, `hookify`, `plugin-dev`, `typescript-lsp`, `code-review`
- Workflow plugins: `code-refactoring`, `kubernetes-operations`, `javascript-typescript`, `backend-development`, `full-stack-orchestration`, `database-design`, `database-migrations`

**Recommended Usage**: For new projects, use the pre-built image without mounting host's `~/.claude` directory. This ensures the image configuration works immediately. See [docs/using-config-base-image.md](docs/using-config-base-image.md) for detailed usage instructions.

**DevContainer推奨設定**: Elu-co-jp配下のリポジトリで統一されたDevContainer環境を構築するための推奨設定とベストプラクティスについては、[.codex/devcontainer-recommendations.md](.codex/devcontainer-recommendations.md)を参照してください。

### Automated Releases
Expand Down
4 changes: 2 additions & 2 deletions docs/devcontainer.json.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Management Tools",
"image": "ghcr.io/keito4/config-base:latest",
"name": "My Project",
"image": "ghcr.io/keito4/config-base:1.45.3",
"remoteEnv": {
"TMPDIR": "/home/vscode/.claude/tmp"
},
Expand Down
34 changes: 20 additions & 14 deletions docs/using-config-base-image.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
// .devcontainer/devcontainer.json
{
"name": "My Project",
"image": "ghcr.io/keito4/config-base:latest",
"image": "ghcr.io/keito4/config-base:1.45.3",
"remoteEnv": {
"TMPDIR": "/home/vscode/.claude/tmp"
}
Expand Down Expand Up @@ -56,17 +56,23 @@ claude --help

以下のプラグインが事前インストールされています:

- `commit-commands@claude-plugins-official`
- `hookify@claude-plugins-official`
- `plugin-dev@claude-plugins-official`
- `frontend-design@claude-plugins-official`
- `typescript-lsp@claude-plugins-official`
- `code-refactoring@claude-code-workflows`
- `code-review@claude-plugins-official`
- `code-review-ai@claude-code-workflows`
- `kubernetes-operations@claude-code-workflows`
- `javascript-typescript@claude-code-workflows`
- `playwright-skill@playwright-skill`
**公式プラグイン (`claude-plugins-official`)**:

- `commit-commands` - Git commit 関連のコマンド
- `hookify` - Git hooks の管理
- `plugin-dev` - プラグイン開発ツール
- `typescript-lsp` - TypeScript 言語サーバー
- `code-review` - コードレビュー支援

**ワークフロープラグイン (`claude-code-workflows`)**:

- `code-refactoring` - リファクタリング支援
- `kubernetes-operations` - Kubernetes 運用
- `javascript-typescript` - JavaScript/TypeScript 開発
- `backend-development` - バックエンド開発
- `full-stack-orchestration` - フルスタック開発オーケストレーション
- `database-design` - データベース設計
- `database-migrations` - データベースマイグレーション

## 高度な構成(ホスト設定の永続化)

Expand All @@ -76,7 +82,7 @@ claude --help
// .devcontainer/devcontainer.json
{
"name": "My Project",
"image": "ghcr.io/keito4/config-base:latest",
"image": "ghcr.io/keito4/config-base:1.45.3",
"remoteEnv": {
"TMPDIR": "/home/vscode/.claude/tmp"
},
Expand Down Expand Up @@ -127,7 +133,7 @@ my-plugin@marketplace
```json
{
"name": "My Project",
"image": "ghcr.io/keito4/config-base:1.43.0",
"image": "ghcr.io/keito4/config-base:1.45.3",
"remoteEnv": {
"TMPDIR": "/home/vscode/.claude/tmp"
},
Expand Down
Loading