Build Pipeline¶
This page traces how one user_config.yml becomes generated Docker and Compose artifacts.
High-Level Flow¶
pei-docker-cli createwrites a project skeleton.pei-docker-cli configureloadsuser_config.ymlandcompose-template.yml.- Config-time
${VAR}substitution runs. PeiConfigProcessorapplies pre-resolution build settings intox-cfg-stage-*sections.- The compose template is resolved.
- Final service-level settings such as environment, ports, storage, and mounts are applied.
- Wrapper scripts and stage environment files are written.
docker-compose.ymlis emitted. Optional merged artifacts are emitted when requested.
Stage-1¶
Stage-1 build args cover:
- base image
- SSH users, ports, key paths, UID/GID values
- APT mirror and proxy settings
- global proxy toggles
- stage-1 environment bake flags
The stage-1 Dockerfile copies the installation files into /pei-from-host/stage-1, runs core setup scripts, and produces the reusable system image.
Stage-2¶
Stage-2 typically inherits the stage-1 output image as its base. After resolution, the processor appends:
- stage-1 ports plus stage-2 ports
- cumulative stage environment map
- stage-2 storage mounts
- stage-specific custom wrapper scripts
Stage-2 runtime storage is finalized at container startup, not at build time.
Merged Build Mode¶
pei-docker-cli configure --with-merged also emits:
merged.Dockerfilemerged.envbuild-merged.shrun-merged.sh
This is a convenience path for CI or users who prefer a plain docker build flow. It is intentionally stricter than compose output and rejects passthrough markers.