Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,28 @@ To revert to using the Containerization dependency from your `Package.swift`:
bin/container system start
```

## Develop using a local copy of container-builder-shim

To test changes that require the `container-builder-shim` project:

1. Clone the [container-builder-shim](https://github.com/apple/container-builder-shim) repository and navigate to its directory.

2. Make the appropriate changes, then build and configure the custom builder image:

```bash
container build -t builder .
container system property set image.builder builder:latest # Use the local builder image
container rm -f buildkit # Remove the already existing buildkit container
Comment on lines +140 to +141
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you able to able to copy/paste these steps into a shell? I see:

% container build -t builder .
container system property set image.builder builder:latest # Use the local builder image
container rm -f buildkit # Remove the already existing buildkit container
Error: failed to find Dockerfile or Containerfile in the context directory .
Error: 6 unexpected arguments: '#', 'Use', 'the', 'local', 'builder', 'image'
Usage: container system property set [--debug] <id> <value>
  See 'container system property set --help' for more information.
Error: failed to delete one or more containers: ["#", "existing", "already", "the", "container", "Remove"]

```
3. Run the container build as usual:

```bash
container build ...
```

> [!IMPORTANT]
> If your modified builder image is broken, make sure to rebuild and correctly tag the builder image before attempting to build `container-builder-shim` again.

## Debug XPC Helpers

Attach debugger to the XPC helpers using their launchd service labels:
Expand Down