Make Pipelines Docker-only with OpenCode and Pi
Install current verified harness releases inside Docker, preserve persistent accounts and settings, and provide separate interactive and pipeline model defaults with terminal onboarding and fuzzy pickers. Add Docker-aware authoring transport, Pi stage execution, bounded workflow controls, reliable final-result readback and usage settlement, and finite short-lived CLI pipe draining. Keep dated installation evidence and packaged authoring guidance consistent. Verified with a real Docker installation, both harness stages and interactive authors, the built-in plan/implement/review starter, independent host race/vet checks, installer tests, and packaged skill tests. Generated release receipts stay ignored in clean checkouts.
This commit is contained in:
@@ -26,8 +26,18 @@ def host_timezone():
|
||||
raise ValueError("Cannot detect the host timezone; provide --timezone explicitly")
|
||||
|
||||
def host_workspaces(directory):
|
||||
home, repository = str(Path.home().resolve()), str(Path(directory).resolve())
|
||||
if any(any(char in value for char in "\r\n\x00$#'\"\\") or value in ("/", "/data", "/workspace", "/home/pipelines") for value in [home, repository]) or home == repository:
|
||||
raw_home = os.environ.get("HOME") or os.environ.get("USERPROFILE") or str(Path.home())
|
||||
home = str(Path.home().resolve())
|
||||
repository = str(Path(directory).resolve())
|
||||
# Reject both the raw and canonical resolved HOME so a platform's home alias
|
||||
# (/home/pipelines on Linux; /System/Volumes/Data/home/pipelines on macOS)
|
||||
# cannot bypass the reserved-path guard. Managed Docker volumes are separate
|
||||
# and are not weakened by these cheap path comparisons.
|
||||
candidates = {raw_home, home, str(Path(raw_home).resolve()), repository}
|
||||
for value in candidates:
|
||||
if any(char in value for char in "\r\n\x00$#'\"\\") or value in ("/", "/data", "/workspace", "/home/pipelines", "/System/Volumes/Data/home/pipelines"):
|
||||
raise ValueError("Host home/checkout cannot be mounted safely at its original path; configure a repository bind mount explicitly")
|
||||
if home == repository or str(Path(raw_home).resolve()) == repository:
|
||||
raise ValueError("Host home/checkout cannot be mounted safely at its original path; configure a repository bind mount explicitly")
|
||||
return {"PIPELINES_HOST_HOME": "'"+home+"'", "PIPELINES_HOST_REPOSITORY": "'"+repository+"'", "PIPELINES_UID": str(os.getuid()), "PIPELINES_GID": str(os.getgid())}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user