Skip to content

feat(docker): run dashboard in Docker with read-only ~/.claude mount#143

Merged
phuryn merged 2 commits into
phuryn:mainfrom
RafikFarhad:main
Jun 21, 2026
Merged

feat(docker): run dashboard in Docker with read-only ~/.claude mount#143
phuryn merged 2 commits into
phuryn:mainfrom
RafikFarhad:main

Conversation

@RafikFarhad

Copy link
Copy Markdown
Contributor

Summary

  • Adds a Dockerfile and scripts/run-docker.sh to run the dashboard inside Docker
  • ~/.claude is mounted read-only — the container can read transcripts but cannot write to your home directory
  • The SQLite database (usage.db) is stored in a named Docker volume (claude-usage-data), isolated from ~/.claude and persisted across restarts
  • CLAUDE_USAGE_DB env var support added to scanner.py, dashboard.py, and cli.py so the DB path is configurable at runtime (default unchanged: ~/.claude/usage.db)

How to use

bash scripts/run-docker.sh
# Dashboard available at http://localhost:9898

Test plan

  • Run bash scripts/run-docker.sh — confirm it builds and starts without error
  • Open http://localhost:9898 — confirm dashboard loads with current data
  • Confirm ~/.claude/ contains no new files written by the container
  • Stop and restart the container — confirm the DB volume persists (no re-scan from scratch)
  • Run python3 cli.py dashboard directly (no Docker) — confirm default DB path (~/.claude/usage.db) is unchanged

Disclaimer: AI-assisted. Ego fully human.

Store usage.db in a separate /data volume so ~/.claude stays read-only
in the container. CLAUDE_USAGE_DB env var lets all three modules resolve
the DB path at runtime instead of hardcoding ~/.claude/usage.db.

Disclaimer: If this looks smart, thank the AI. If not, blame me.
Documents the run-docker.sh script, the read-only ~/.claude mount, and
the named volume for the SQLite database. Also adds Dockerfile and
scripts/run-docker.sh to the Files table.

Disclaimer: If this looks smart, thank the AI. If not, blame me.
phuryn added a commit that referenced this pull request Jun 21, 2026
Bump scanner.VERSION + vscode-extension/package.json to 1.5.0 and add the
v1.5.0 — TBD CHANGELOG heading covering the subagent-attribution split
(#140, @john988) and Docker support (#143, @RafikFarhad). Minor bump:
both are non-breaking user-visible features.

Date stays TBD and the DEV->main release merge is left to the maintainer
per the documented release flow.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@phuryn phuryn merged commit 7557a25 into phuryn:main Jun 21, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants