Problem
When running the Docker container, every local_folder source in config.yaml must be manually added as a -v flag in the docker run command. The config and the Docker command are two sources of truth that must stay in sync.
Example today:
docker run -i \
-v ~/project/.knowledge:/knowledge/.knowledge \
-v ~/project/docs:/knowledge/docs:ro \
-v ~/project/wiki:/knowledge/wiki:ro \
agentic-knowledge-mcp
With config.yaml:
docsets:
- id: docs
sources:
- type: local_folder
paths:
- ./docs
- id: wiki
sources:
- type: local_folder
paths:
- ./wiki
Proposed solution
A wrapper script (e.g., run.sh) that:
- Parses
config.yaml for local_folder source paths (using js-yaml, already a dependency)
- Resolves relative paths against the config directory
- Generates the
docker run command with -v flags for each path
- Mounts
.knowledge as writable, all source dirs as read-only
./run.sh # runs with all docsets
./run.sh my-docs # runs only a specific docset
The script could also:
- Validate all paths exist before invoking Docker (instant feedback)
- Accept extra
-v flags for anything the config does not cover
- Accept environment variables for proxy config on corporate networks
Acceptance criteria
Problem
When running the Docker container, every
local_foldersource inconfig.yamlmust be manually added as a-vflag in thedocker runcommand. The config and the Docker command are two sources of truth that must stay in sync.Example today:
With
config.yaml:Proposed solution
A wrapper script (e.g.,
run.sh) that:config.yamlforlocal_foldersource paths (usingjs-yaml, already a dependency)docker runcommand with-vflags for each path.knowledgeas writable, all source dirs as read-onlyThe script could also:
-vflags for anything the config does not coverAcceptance criteria
config.yamland extracts alllocal_folderpathsdocker runwith volume mountsdocs/docker.md's open points