Sign inSign up

loice5/secure-vibe

By loice5

Updated 4 months ago

Run Claude Code in an isolated, hardened container with automatic credential injection.

Image
Machine learning & AI
Developer tools
0

3.5K

loice5/secure-vibe repository overview

secure-vibe

Run Claude Code inside an isolated, hardened Docker container — with automatic credential injection, a persistent package environment, and an optional file-exclusion system to keep secrets away from the AI.

What's inside the image

Built on Ubuntu 24.04, the image goes through a strict hardening process at build time:

  • A non-root user (viber) is created and all subsequent layers run as that user
  • Root is locked: its login shell is replaced with nologin and its password is locked — root is unreachable from inside the container
  • Homebrew is installed rootlessly under /home/linuxbrew/.linuxbrew, with Bun and GCC pre-installed
  • Claude Code is installed via the official installer
  • A seed snapshot of the Homebrew prefix is stored at /opt/linuxbrew-seed/ so a named Docker volume (secure-vibe-brew) can be initialized on first run without any root access — packages installed during a session survive container restarts

How it works

The image is meant to be used via the secure-vibe CLI (a Bun/TypeScript tool):

  1. The CLI mounts your project directory into the container
  2. Your Claude credentials are resolved automatically from ~/.claude.json, the macOS Keychain, or ~/.claude/.credentials.json, then injected into the container via an environment variable — nothing is written back to the host
  3. The ~/.claude host directory is mounted read-only
  4. Claude Code starts automatically with --dangerously-skip-permissions — safe to use because it runs in an isolated container, not on your host system
  5. You can optionally exclude files (e.g. .env, secrets) from the container filesystem before Claude runs, using glob patterns — they are moved out before the container starts and restored after it exits

Key capabilities

  • Supports Docker and Podman
  • --exclude flag to hide sensitive files from the container at runtime
  • --save flag to zip or copy your project before Claude touches it
  • Persistent Homebrew volume so Claude can install dependencies on the fly without rebuilding the image
  • System paths (~, /, /etc, /usr, etc.) are blocked from being mounted as the working directory

Build & delivery

The image is built and pushed to Docker Hub weekly via GitHub Actions, always tracking the latest version of Claude Code.

Source

github.com/LoicE5/secure-vibe

Tag summary

Content type

Image

Digest

sha256:8fce8a909

Size

1.3 GB

Last updated

4 months ago

docker pull loice5/secure-vibe