Skip to content

[Request]: Be able to use containers from LaunchDaemon-based CI runners #1514

Description

@thomasjm

Feature or enhancement request details

When you run container system start, it installs container-apiserver as a per-user LaunchAgent in gui/<uid>, with state under ~/Library/Application Support/com.apple.container/. This is awkward for CI: GitHub's actions/runner and most macOS CI runners are designed to install as LaunchDaemons (no GUI session needed). A daemon-mode runner can't reach the apiserver's mach service in gui/<uid>, so steps that shell out to container ... fail.

If you install the CI runner itself as a LaunchAgent, then the processes it spawns end up in the user GUI session, where they become subject to macOS's Local Network Privacy checks. So if you start a container and it ends up with IP address 192.168.64.1, and your test code tries to access it, you can run into LNP issues and get "No route to host" errors.

Apple's support itself actually recommends using a LaunchDaemon as a workaround for LNP issues.

So there are seemingly blockers for using containers in CI via either LaunchAgent or LaunchDaemon runners. In general I'd prefer to use LaunchDaemons since LaunchAgents are more cumbersome. Is there some way to work with containers from within a LaunchDaemon? If not, I'd like to request this functionality. Thanks!

Code of Conduct

  • I agree to follow this project's Code of Conduct
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions