Architecture¶
PeiDocker has a small public surface and a larger template/runtime surface behind it. The core job is to transform a typed YAML config into reproducible build and runtime artifacts.
System Overview¶
- The CLI loads
user_config.yml. pei_utils.pyperforms config-time environment substitution and validation.PeiConfigProcessormerges the config into a compose template.- Generated wrapper scripts are written under
installation/stage-*/generated/. - Docker builds
stage-1and thenstage-2. - Runtime entrypoint scripts prepare storage, run lifecycle hooks, and hand off to SSH, a custom entrypoint, or a fallback shell/blocking process.
Main Components¶
| Area | Role |
|---|---|
src/pei_docker/pei.py |
CLI entry points for create, configure, remove |
src/pei_docker/config_processor.py |
Config-to-compose transformation and generated wrapper creation |
src/pei_docker/pei_utils.py |
YAML loading, env substitution, path helpers, passthrough rewriting |
src/pei_docker/user_config/ |
Typed config model |
src/pei_docker/project_files/ |
Dockerfiles, installation scripts, and runtime internals |
src/pei_docker/templates/ |
Full config template, quick templates, base compose template |
src/pei_docker/webgui/ |
Deprecated but still present GUI code |
Source Tree Mapping¶
user_config/*: the shape of accepted YAMLproject_files/installation/stage-1/internals: system bootstrap and SSH setupproject_files/installation/stage-2/internals: storage linking and runtime lifecycleproject_files/installation/stage-1/system: canonical built-in installersproject_files/installation/stage-2/system: mostly forwarding wrappers