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>
This commit is contained in:
rpgdev
2026-03-10 07:38:07 -04:00
committed by GitHub
parent 8256ebba76
commit 6dc4b4f0cb
3 changed files with 161 additions and 3 deletions
+3 -3
View File
@@ -42,9 +42,9 @@
},
"remoteUser": "vscode",
"mounts": [
"source=claude-code-bashhistory-${devcontainerId},target=/commandhistory,type=volume",
"source=claude-code-config-${devcontainerId},target=/home/vscode/.claude,type=volume",
"source=claude-code-gh-${devcontainerId},target=/home/vscode/.config/gh,type=volume",
"source=devc-${localWorkspaceFolderBasename}-bashhistory-${devcontainerId},target=/commandhistory,type=volume",
"source=devc-${localWorkspaceFolderBasename}-config-${devcontainerId},target=/home/vscode/.claude,type=volume",
"source=devc-${localWorkspaceFolderBasename}-gh-${devcontainerId},target=/home/vscode/.config/gh,type=volume",
"source=${localEnv:HOME}/.gitconfig,target=/home/vscode/.gitconfig,type=bind,readonly",
"source=${localWorkspaceFolder}/.devcontainer,target=/workspace/.devcontainer,type=bind,readonly"
],