72e35a1343
test / integration-docker (pull_request) Successful in 13s
tracker-policy-pr / check-pr (pull_request) Successful in 11s
test / unit (pull_request) Successful in 37s
test / stage-firecracker-inputs (pull_request) Successful in 2s
lint / lint (push) Successful in 2m44s
test / build-infra (pull_request) Successful in 3m38s
test / integration-firecracker (pull_request) Successful in 2m7s
test / coverage (pull_request) Failing after 1m59s
test / publish-infra (pull_request) Has been skipped
Add an opt-in docker_access path that layers rootless Docker tooling onto the selected agent image, starts the daemon only after registration, and retains the existing outer network and capability boundary. Include fail-closed bootstrap checks plus a live-Mac Compose/security acceptance test.\n\nRefs #392.
49 lines
1.3 KiB
Python
49 lines
1.3 KiB
Python
"""Prepare step for the macOS Apple Container backend."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from pathlib import Path
|
|
|
|
from ...agent_provider import AgentProvisionPlan
|
|
from ...egress import EgressPlan
|
|
from ...env import ResolvedEnv
|
|
from ...git_gate import GitGatePlan
|
|
from ...supervise import SupervisePlan
|
|
from ...manifest import Manifest
|
|
from .. import BottleSpec
|
|
from . import util as container_mod
|
|
from .bottle_plan import MacosContainerBottlePlan
|
|
|
|
|
|
def preflight() -> None:
|
|
container_mod.require_container()
|
|
|
|
|
|
def build_guest_env(resolved_env: ResolvedEnv) -> dict[str, str]:
|
|
return dict(resolved_env.literals)
|
|
|
|
|
|
def resolve_plan(
|
|
spec: BottleSpec,
|
|
manifest: Manifest,
|
|
slug: str,
|
|
resolved_env: ResolvedEnv,
|
|
agent_provision_plan: AgentProvisionPlan,
|
|
egress_plan: EgressPlan,
|
|
supervise_plan: SupervisePlan | None,
|
|
git_gate_plan: GitGatePlan,
|
|
stage_dir: Path,
|
|
) -> MacosContainerBottlePlan:
|
|
return MacosContainerBottlePlan(
|
|
spec=spec,
|
|
manifest=manifest,
|
|
stage_dir=stage_dir,
|
|
slug=slug,
|
|
forwarded_env=dict(resolved_env.forwarded),
|
|
git_gate_plan=git_gate_plan,
|
|
egress_plan=egress_plan,
|
|
supervise_plan=supervise_plan,
|
|
agent_provision=agent_provision_plan,
|
|
docker_access=manifest.bottle.docker_access,
|
|
)
|