-
Notifications
You must be signed in to change notification settings - Fork 163
Open
Labels
cliChanges that impact CLI functionalityChanges that impact CLI functionalityenhancementNew feature or requestNew feature or requestregistry
Description
Title
volume:// resource URI mounts are logged but not applied in CLI mode
Description
When using volume://name:container-path syntax in the CLI (either via -v flag or from registry permissions.write), ToolHive logs that it's adding the mount but then shows a warning and does not actually create the mount.
Steps to Reproduce
- Create a local registry file:
{
"servers": {
"test-server": {
"image": "alpine:latest",
"permissions": {
"write": ["volume://my-test-volume:/app/data"]
}
}
}
}- Set the registry and run:
thv config set-registry ~/registry.json
thv run test-server- Check container mounts:
docker inspect test-server | jq ".[0].Mounts"
# Returns: []- Check logs:
cat ~/Library/Application\ Support/toolhive/logs/test-server.log | grep -i volume
# Shows: Warning: Resource URI mounts not yet supported: volume://my-test-volumeExpected Behavior
Docker named volumes should be created and mounted, similar to:
docker run -v my-test-volume:/app/data alpineThis would allow:
- Zero-setup data persistence (Docker manages the volume)
- No
mkdir -pprerequisites for users - Seamless registry-based installation without manual volume flags
Actual Behavior
- ToolHive logs
Adding volume mount: volume://my-test-volume -> /app/data (read-write) - Then logs
Warning: Resource URI mounts not yet supported: volume://my-test-volume - Container starts with no mounts
Environment
- ToolHive version: v0.6.14 (also tested v0.6.15)
- Platform: macOS (darwin/arm64)
- Container runtime: Docker Desktop
Related
- The
volume://syntax appears to be documented and parsed, but implementation is incomplete for CLI mode - Path-based bind mounts (
/host/path:/container/path) work correctly from registrypermissions.write - This may already work in Kubernetes mode (as PVC references) but not CLI/Docker mode
Suggested Implementation
When ToolHive sees volume://name:container-path:
- Create a Docker named volume if it doesn't exist
- Mount it at the specified container path
- Handle both
permissions.read(read-only) andpermissions.write(read-write)
This would match Docker's native behavior:
docker run -v my-volume:/app/data # Creates volume if neededJAORMX
Metadata
Metadata
Assignees
Labels
cliChanges that impact CLI functionalityChanges that impact CLI functionalityenhancementNew feature or requestNew feature or requestregistry