Commit Graph

19 Commits

Author SHA1 Message Date
dm 48df2ad80d feat: add Renovate config to keep Dockerfile updated (#38)
Add renovate.json with a custom regex manager that picks up
`# renovate:` comment directives on ARG lines. This covers:
- Docker base images (handled natively by Renovate's dockerfile manager)
- git-delta, fzf, and zsh-in-docker versions via github-releases

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-09 13:23:28 +02:00
Dave Eargle ab1d7e6e4b fix search path for .claude.json to account for CLAUDE_CONFIG_DIR (#40)
* fix search path for .claude.json to account for CLAUDE_CONFIG_DIR

When `CLAUDE_CONFIG_DIR` is set, as is done in `devcontainer.json`, `claude` looks
for `.claude.json` in that folder; otherwise, `~` is used.

Learned through observation, not claude documentation :old-man-yells-at-cloud:

* add more words to the lookup behavior description

* Apply suggestion from @DarkaMaul

---------

Co-authored-by: dm <darkamaul@hotmail.fr>
2026-04-09 09:25:04 +02:00
Ehren Bendler 40ca54d410 Update versions in Dockerfile (#34) 2026-03-23 09:18:56 +01:00
Akshith G 5a2b92a790 feat: add non-interactive auth via CLAUDE_CODE_OAUTH_TOKEN (#32)
* feat: add non-interactive auth via CLAUDE_CODE_OAUTH_TOKEN

Bypass the interactive onboarding wizard when CLAUDE_CODE_OAUTH_TOKEN is
set. On container create, post_install.py runs `claude -p` to populate
auth state and sets hasCompletedOnboarding so the TUI starts without the
login wizard.

Workaround for https://github.com/anthropics/claude-code/issues/8938.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: use remoteEnv instead of containerEnv for secrets

containerEnv bakes values into the image as ENV instructions, visible
in docker inspect/history. remoteEnv is set at runtime only.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: improve error handling in onboarding bypass

- Handle timeout as expected (claude -p writes config before API call)
- Catch FileNotFoundError/OSError if claude is not installed
- Check returncode explicitly instead of dead CalledProcessError catch
- Guard on ~/.claude.json existence before writing onboarding flag
- Replace contextlib.suppress with explicit try/except that logs
- Update module docstring and README wording

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 06:36:47 -07:00
rpgdev 6dc4b4f0cb feat: add devc destroy command and standardize volume naming (#31)
Add `devc destroy [-f]` to cleanly remove all Docker resources
(container, volumes, images) for a project. Includes resource
discovery via container inspection, itemized pre-deletion summary,
y/N confirmation prompt with --force bypass, running container
warning, and idempotent no-op when no resources exist.

Rename volume prefix from claude-code-* to devc-* and include
workspace folder name for self-identifying volumes
(e.g., devc-myproject-config-{devcontainerId}).

Co-authored-by: Disconnect3d <dominik.b.czarnota@gmail.com>
2026-03-10 12:38:07 +01:00
dm 8256ebba76 Add devc sync to copy devcontainer sessions to host (#27)
* Add `devc sync` to copy devcontainer sessions to host for /insights

Claude Code's /insights reads sessions from ~/.claude/projects/ on
the host, but devcontainer sessions live inside container volumes.
This adds a `devc sync [project]` command that copies them over so
/insights can analyze devcontainer work alongside local sessions.

- Auto-discovers devcontainers via devcontainer.local_folder label
- Works on both running and stopped containers (docker cp only)
- Reads CLAUDE_CONFIG_DIR from container env for non-standard paths
- Incremental: only copies new/updated files
- Optional project name filter (case-insensitive substring)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Add devc sync to README

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Add safety prompt to `devc sync` before copying from containers

Warns users that sync copies files from devcontainers to the host
filesystem. Adds --trusted flag to skip the prompt for automation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 09:31:45 +01:00
dm d05cd49ea2 Fix SSH commit signing in devcontainer when host uses 1Password (#25)
When the host configures `gpg.ssh.program` to use 1Password's
`op-ssh-sign` binary, commit signing fails inside the container
because that macOS-specific binary doesn't exist.

DevContainers automatically forward SSH_AUTH_SOCK from the host,
so the SSH agent (including 1Password's) is already available.
By overriding `gpg.ssh.program` to `/usr/bin/ssh-keygen` in the
container's local gitconfig (which is included after the host
config), signing uses the standard ssh-keygen against the
forwarded agent instead of the missing 1Password binary.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-06 01:10:00 +01:00
dm 85a0d4def9 Add CODEOWNERS file (#26)
* Add CODEOWNERS file

Require review from @dguido, @computerality, and @DarkaMaul for all
changes in the repository.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Apply suggestion from @disconnect3d

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Disconnect3d <dominik.b.czarnota@gmail.com>
2026-03-06 01:06:05 +01:00
Disconnect3d b07698855e Add cp command to copy files from container to host (#30)
Enables ad-hoc file extraction from a running devcontainer using
`docker cp`, without requiring a mount or container rebuild.

Usage: devc cp <container_path> <host_path>

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 01:05:29 +01:00
Jay Little c7ec556ae6 add marketplace skills-curated (#23)
Added 'trailofbits/skills-curated' plugin to Claude Code installation.
2026-02-13 11:52:19 -05:00
Dan Guido daab646db6 Fix bind mount failure when ~/.gitconfig does not exist (#24)
Docker bind mounts require the source file to exist. Users without
~/.gitconfig (fresh machines, XDG-based config, system-only config)
hit a container start failure.

Add initializeCommand to create an empty ~/.gitconfig on the host
before the container starts. An empty gitconfig is valid and has no
side effects — git treats it as having no settings.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 11:52:07 -05:00
Dan Guido 84a3aa4fd8 Document file sharing options and missing CLI commands (#22)
Add File Sharing section covering VS Code drag-and-drop and devc mount.
Add exec, upgrade, and mount to the CLI commands table. Expand the
Container Details table with volume mount paths and host mounts.

Closes #10

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 19:34:08 -05:00
Dan Guido 74d87a53da Minor cleanups: default TZ to UTC, shellcheck directive, comment clarity (#21)
- Default timezone to UTC instead of America/New_York
- Add shellcheck shell=bash directive to .zshrc
- Extract docker filter label into local variable in cmd_down
- Clarify mount filter comment (target paths immune to project name changes)

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 06:49:08 -05:00
Dan Guido a1f3994cda Harden devcontainer: pin digests, guard SYS_ADMIN, fix mount filters (#20)
Address review feedback from #14–#19:

- Pin base image and uv with SHA256 digests (#15)
- Install fzf from GitHub releases instead of apt (#14)
- Add SYS_ADMIN capability guard to prevent remount attacks (#16)
- Fix mount filter to use target paths instead of source prefixes (#17)
- Fix temp file leak in extract_mounts_to_file (#17)
- Sort apt packages alphabetically (#18)
- Remove unused Tailscale feature (#19)

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 06:35:35 -05:00
Dan Guido 90e3280503 Mount .devcontainer/ read-only to prevent container escape on rebuild (#13)
A process inside the container could modify .devcontainer/devcontainer.json
to inject malicious mounts or initializeCommand entries that execute on the
host during the next rebuild. Bind-mounting .devcontainer/ as read-only
blocks this privilege escalation vector.

Uses startswith() for the jq filter to be precise and consistent with
other mount filters, and documents the SYS_ADMIN guard requirement.

Based on PR #12 with review feedback from @dguido addressed.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 03:20:33 -05:00
Dan Guido 96e3ca270f Add exec, upgrade, and mount commands to devc CLI (#8)
* Add exec, upgrade, and mount commands to devc CLI

- exec: Run arbitrary commands in the container
- upgrade: Update Claude Code to latest version
- mount: Add bind mounts to devcontainer.json (recreates container)

Also preserves custom mounts when template command overwrites
existing devcontainer configuration.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Address PR review comments

- Replace `npm install -g @anthropic-ai/claude-code@latest` with
  `claude update` since Claude Code now uses native installer
- Remove `[--]` from exec command help/examples (not required)
- Replace embedded Python with jq for devcontainer.json manipulation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 16:20:46 -05:00
Dan Guido 369b395361 Add bubblewrap and socat for Claude Code sandboxing (#9)
These packages are required for Claude Code's native sandboxing on Linux:
- bubblewrap: Provides filesystem isolation via Linux namespaces
- socat: Enables the network proxy for domain filtering

Without these, the /sandbox command shows installation instructions
instead of enabling sandbox mode.

Ref: https://code.claude.com/docs/en/sandboxing

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 19:19:14 -05:00
Dan Guido fefdf3f43d Use contextlib.suppress for cleaner exception handling
Fixes ruff SIM105 lint warning.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 20:49:10 -05:00
Dan Guido 91ff6f7c0c Initial commit 2026-01-29 20:13:16 -05:00