Problem
The buildroot_workspace volume creation guard is duplicated across all run scripts in every BR2_EXTERNAL:
docker volume inspect buildroot_workspace >/dev/null 2>&1 || docker volume create buildroot_workspace
This pattern appears in 16+ files across 5 repos. If the volume name changes or the logic needs to evolve (e.g., checking Docker is running first), all files in all repos must be updated.
Proposed solution
Extract the guard into a shared helper in docker-buildroot/scripts/ that run scripts source. Since all run scripts already execute from the docker-buildroot root, this formalizes an implicit dependency that already exists.
Impact
scripts/run_template.sh — add sourcing of shared helper
- All existing run scripts in each BR2_EXTERNAL — update to source helper instead of inline guard
- No functional change for end users
Problem
The
buildroot_workspacevolume creation guard is duplicated across all run scripts in every BR2_EXTERNAL:This pattern appears in 16+ files across 5 repos. If the volume name changes or the logic needs to evolve (e.g., checking Docker is running first), all files in all repos must be updated.
Proposed solution
Extract the guard into a shared helper in
docker-buildroot/scripts/that run scripts source. Since all run scripts already execute from thedocker-buildrootroot, this formalizes an implicit dependency that already exists.Impact
scripts/run_template.sh— add sourcing of shared helper